summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-28 09:33:53 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-09-28 09:33:53 -0400
commit0c8de6a3f58cde2696ac276b3456f3577d312e2b (patch)
treef0b4f7f4f7c6f45d8c123f0bfdb57325785fb7b7 /app
parent9003f830efcdc92865754a5d62e9fd2fea172af7 (diff)
Request::getValues() doesn't parse json request anymore
Diffstat (limited to 'app')
-rw-r--r--app/Core/Request.php17
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();