From 5b05665ff07d5af0dcd1d195711448202d0add7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 16 Jun 2016 13:07:13 +0200 Subject: [PATCH] Ensure kill ID is integer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- server_status_processes.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server_status_processes.php b/server_status_processes.php index c8c3f6003f..2533ac31eb 100644 --- a/server_status_processes.php +++ b/server_status_processes.php @@ -26,7 +26,8 @@ $response = PMA\libraries\Response::getInstance(); * on ajax request */ if ($response->isAjax() && !empty($_REQUEST['kill'])) { - $query = $GLOBALS['dbi']->getKillQuery((int)$_REQUEST['kill']); + $kill = intval($_REQUEST['kill']); + $query = $GLOBALS['dbi']->getKillQuery($kill); if ($GLOBALS['dbi']->tryQuery($query)) { $message = PMA\libraries\Message::success( __('Thread %s was successfully killed.') @@ -41,7 +42,7 @@ if ($response->isAjax() && !empty($_REQUEST['kill'])) { ); $response->setRequestStatus(false); } - $message->addParam($_REQUEST['kill']); + $message->addParam($kill); $response->addJSON('message', $message); } elseif ($response->isAjax() && !empty($_REQUEST['refresh'])) { // Only sends the process list table