Index: branches/5.3.x/core/kernel/utility/http_query.php =================================================================== diff -u -N -r15974 -r15999 --- branches/5.3.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 15974) +++ branches/5.3.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 15999) @@ -1,6 +1,6 @@ Application->recallObject('SiteHelper'); /* @var $site_helper SiteHelper */ - $found = false; - $http_referer = $_SERVER['HTTP_REFERER']; - preg_match('/^(.*?):\/\/(.*?)(\/|$)/', $http_referer, $regs); // 1 - protocol, 2 - domain + $parsed_url = parse_url($_SERVER['HTTP_REFERER']); - if ($regs[1] == 'https') { - $found = $site_helper->getDomainByName('SSLUrl', $http_referer) > 0; - - if (!$found) { - // check if referer starts with our ssl url - $ssl_url = $this->Application->ConfigValue('SSL_URL'); - $found = $ssl_url && preg_match('/^' . preg_quote($ssl_url, '/') . '/', $http_referer); - } + if ( $parsed_url['scheme'] == 'https' ) { + $found = $site_helper->compare($parsed_url['host'], 'SSLDomainName', $this->Application->ConfigValue('SSLDomain')); } else { - $found = $site_helper->getDomainByName('DomainName', $regs[2]) > 0; - - if (!$found) { - $found = $regs[2] == DOMAIN; - } + $found = $site_helper->compare($parsed_url['host'], 'DomainName', DOMAIN); } return $found; @@ -770,4 +758,4 @@ return $headers; } -} +} \ No newline at end of file