From e37bf40f44a3272a6709eb5b38feccac41658e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 8 Dec 2016 10:59:53 +0100 Subject: [PATCH] Avoid using REQUEST_URI for redirection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Stick with PMA_sendHeaderLocation to handle server weirdness * Use already calculated URL Signed-off-by: Michal Čihař --- libraries/config/PageSettings.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/config/PageSettings.php b/libraries/config/PageSettings.php index 5aeddab481..cb319a1622 100644 --- a/libraries/config/PageSettings.php +++ b/libraries/config/PageSettings.php @@ -112,7 +112,10 @@ class PageSettings $result = PMA_saveUserprefs($cf->getConfigArray()); if ($result === true) { // reload page - header('Location: ' . $_SERVER['REQUEST_URI']); + $response = Response::getInstance(); + PMA_sendHeaderLocation( + $response->getFooter()->getSelfUrl('unencoded') + ) exit(); } else { $error = $result;