From c530d9324ec75ee509f01764df70e34e57327589 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 14 Feb 2018 17:07:37 +0100 Subject: [PATCH] rawurlencode params --- override/classes/FrontController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/override/classes/FrontController.php b/override/classes/FrontController.php index dd353c78..86761487 100755 --- a/override/classes/FrontController.php +++ b/override/classes/FrontController.php @@ -351,12 +351,14 @@ class FrontController extends FrontControllerCore $excludedKey = array('isolang', 'id_lang'); foreach($_GET as $key => $value) { if(!in_array($key, $excludedKey)) { - $params .= ($params == '' ? '?' : '&').$key.'='.$value; + $params .= ($params == '' ? '?' : '&').$key.'='.rawurlencode($value); } } + if(defined('_PS_MODE_DEV_') && _PS_MODE_DEV_ && $_SERVER['REQUEST_URI'] != __PS_BASE_URI__) { die('[Debug] This page has moved
Please use the following URL instead: '.$canonicalURL.$params.''); } + header('HTTP/1.0 301 Moved'); Tools::redirectLink($canonicalURL.$params); }