diff --git a/classes/ConnectionsSource.php b/classes/ConnectionsSource.php index 489e89968..0e86de001 100644 --- a/classes/ConnectionsSource.php +++ b/classes/ConnectionsSource.php @@ -69,7 +69,7 @@ class ConnectionsSourceCore extends ObjectModel { $parsed = parse_url($_SERVER['HTTP_REFERER']); $parsed_host = parse_url(Tools::getProtocol().Tools::getHttpHost(false, false).__PS_BASE_URI__); - if ((preg_replace('/^www./', '', $parsed['host']) == preg_replace('/^www./', '', Tools::getHttpHost(false, false))) + if ((!isset($parsed['path']) ||!isset($parsed_host['path'])) || (preg_replace('/^www./', '', $parsed['host']) == preg_replace('/^www./', '', Tools::getHttpHost(false, false))) && !strncmp($parsed['path'], $parsed_host['path'], strlen(__PS_BASE_URI__))) return false; if (Validate::isAbsoluteUrl(strval($_SERVER['HTTP_REFERER'])))