Compare end of domains when checking known SSL whitelist.
For example: "imgur.com.mysite.com" should not match the "imgur.com" whitelist entry.
This commit is contained in:
parent
ed0f2a6c97
commit
f2fbb4ee7e
|
@ -124,7 +124,7 @@ class Af_Zz_ImgProxy extends Plugin {
|
||||||
$parts = parse_url($url);
|
$parts = parse_url($url);
|
||||||
|
|
||||||
foreach (explode(" " , $this->ssl_known_whitelist) as $host) {
|
foreach (explode(" " , $this->ssl_known_whitelist) as $host) {
|
||||||
if (strpos($parts['host'], $host) !== FALSE) {
|
if (substr(strtolower($parts['host']), -strlen($host)) === strtolower($host)) {
|
||||||
$parts['scheme'] = 'https';
|
$parts['scheme'] = 'https';
|
||||||
|
|
||||||
return build_url($parts);
|
return build_url($parts);
|
||||||
|
|
Loading…
Reference in New Issue