From 0c8de6a3f58cde2696ac276b3456f3577d312e2b Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 28 Sep 2014 09:33:53 -0400 Subject: Request::getValues() doesn't parse json request anymore --- app/Core/Request.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'app/Core/Request.php') diff --git a/app/Core/Request.php b/app/Core/Request.php index 31672ff6..a4c426f0 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(); -- cgit v1.2.3