mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 10:15:55 +00:00
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:
@@ -124,7 +124,7 @@ class Af_Zz_ImgProxy extends Plugin {
|
||||
$parts = parse_url($url);
|
||||
|
||||
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';
|
||||
|
||||
return build_url($parts);
|
||||
|
||||
Reference in New Issue
Block a user