From 9b8a7edad82270bfe1abbab39dccc91f5bc8cd86 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 21 Oct 2013 01:05:18 +0200 Subject: [PATCH] // small refacto --- controllers/front/AuthController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index 58582cff2..d8852cebc 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -327,7 +327,7 @@ class AuthControllerCore extends FrontController if (!$this->ajax) { - if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer(Tools::getValue('back'))) + if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer($back)) Tools::redirect(html_entity_decode($back)); Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account')); } @@ -464,7 +464,7 @@ class AuthControllerCore extends FrontController die(Tools::jsonEncode($return)); } - if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer(Tools::getValue('back'))) + if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer($back)) Tools::redirect(html_entity_decode($back)); // redirection: if cart is not empty : redirection to the cart if (count($this->context->cart->getProducts(true)) > 0) @@ -624,7 +624,7 @@ class AuthControllerCore extends FrontController if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) Tools::redirect('index.php?controller=address'); - if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer(Tools::getValue('back'))) + if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer($back)) Tools::redirect(html_entity_decode($back)); // redirection: if cart is not empty : redirection to the cart