Move token generation to Security namespace

This commit is contained in:
Frederic Guillot
2015-10-25 15:05:19 -04:00
parent 06e9486c59
commit 6756ef2301
15 changed files with 80 additions and 86 deletions

View File

@@ -8,7 +8,7 @@ namespace Kanboard\Core;
* @package core
* @author Frederic Guillot
*/
class Request
class Request extends Base
{
/**
* Get URL string parameter
@@ -57,7 +57,8 @@ class Request
*/
public function getValues()
{
if (! empty($_POST) && Security::validateCSRFFormToken($_POST)) {
if (! empty($_POST) && ! empty($_POST['csrf_token']) && $this->token->validateCSRFToken($_POST['csrf_token'])) {
unset($_POST['csrf_token']);
return $_POST;
}