From 0c8de6a3f58cde2696ac276b3456f3577d312e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sun, 28 Sep 2014 09:33:53 -0400 Subject: [PATCH] Request::getValues() doesn't parse json request anymore --- app/Core/Request.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/app/Core/Request.php b/app/Core/Request.php index 31672ff6b..a4c426f04 100644 --- a/app/Core/Request.php +++ b/app/Core/Request.php @@ -50,26 +50,15 @@ class Request } /** - * Get form values or unserialized json request + * Get form values and check for CSRF token * * @access public * @return array */ public function getValues() { - if (! empty($_POST)) { - - if (Security::validateCSRFFormToken($_POST)) { - return $_POST; - } - - return array(); - } - - $result = json_decode($this->getBody(), true); - - if ($result) { - return $result; + if (! empty($_POST) && Security::validateCSRFFormToken($_POST)) { + return $_POST; } return array();