From 06fe8c0e25b107e75ce54e33a8b5f3f4b1afac34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 22 Mar 2017 10:24:31 +0100 Subject: [PATCH] Properly report invalid token error on AJAX requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to keep ajax_request flag to properly report result in JSON. Issue #13114 Signed-off-by: Michal Čihař --- libraries/common.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 3785c7f438..4922999b91 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -382,9 +382,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { /** * We don't allow any POST operation parameters if the token is mismatched * or is not provided - * */ - $whitelist = array(); + $whitelist = array('ajax_request'); PMA\libraries\Sanitize::removeRequestVars($whitelist); } }