[-] FO : cut long referrers in order to avoid a crash #PSCFV-7775

This commit is contained in:
Damien Metzger
2013-02-21 16:19:10 +01:00
parent e9cacdcfd4
commit 60671ab46b

View File

@@ -145,7 +145,7 @@ class ConnectionCore extends ObjectModel
$connection->id_shop_group = Context::getContext()->shop->id_shop_group;
$connection->date_add = $cookie->date_add;
if (Validate::isAbsoluteUrl($referer))
$connection->http_referer = $referer;
$connection->http_referer = substr($referer, 0, 254);
$connection->add();
$cookie->id_connections = $connection->id;
return $connection->id_page;