diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-28 09:33:53 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-28 09:33:53 -0400 |
commit | 0c8de6a3f58cde2696ac276b3456f3577d312e2b (patch) | |
tree | f0b4f7f4f7c6f45d8c123f0bfdb57325785fb7b7 /app/Core/Request.php | |
parent | 9003f830efcdc92865754a5d62e9fd2fea172af7 (diff) |
Request::getValues() doesn't parse json request anymore
Diffstat (limited to 'app/Core/Request.php')
-rw-r--r-- | app/Core/Request.php | 17 |
1 files changed, 3 insertions, 14 deletions
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(); |