[-] FO : Bad value for back when controller name is sent

This commit is contained in:
gRoussac committed 2013-11-13 12:30:39 +01:00
1 parent 4479db88a0
commit 5a8c335d78
1 file changed
+9 -6
+9 -6
View File
@@ -87,12 +87,15 @@ class AuthControllerCore extends FrontController
$this->context->smarty->assign('newsletter', 1); $this->context->smarty->assign('newsletter', 1);
$back = Tools::getValue('back'); if ($back = Tools::safeOutput(Tools::getValue('back')))
$key = Tools::safeOutput(Tools::getValue('key')); {
if (!empty($key)) $key = Tools::safeOutput(Tools::getValue('key'));
$back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key; if (!empty($key))
if (!empty($back)) $back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key;
$this->context->smarty->assign('back', Tools::safeOutput(Tools::secureReferrer($back))); if ($back == Tools::secureReferrer(Tools::getValue('back')))
$this->context->smarty->assign('back', html_entity_decode($back));
$this->context->smarty->assign('back', $back);
}
if (Tools::getValue('display_guest_checkout')) if (Tools::getValue('display_guest_checkout'))
{ {