diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-01-29 15:56:30 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-01-29 15:56:30 -0800 |
commit | 9ddefa979a12aff2334d6e7048e142cfdef5bb89 (patch) | |
tree | 30416f103ba88c7bdf1039c9d40085a7a784ddc0 /app/Controller/BaseController.php | |
parent | 90984d6bb9b3bd508e0ca7f8c0ee07d304679fb5 (diff) |
Add CSRF check for task and project files upload
Diffstat (limited to 'app/Controller/BaseController.php')
-rw-r--r-- | app/Controller/BaseController.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/Controller/BaseController.php b/app/Controller/BaseController.php index 43ecfaab..1433ec14 100644 --- a/app/Controller/BaseController.php +++ b/app/Controller/BaseController.php @@ -26,6 +26,13 @@ abstract class BaseController extends Base } } + protected function checkReusableCSRFParam() + { + if (! $this->token->validateReusableCSRFToken($this->request->getRawValue('csrf_token'))) { + throw new AccessForbiddenException(); + } + } + /** * Check webhook token * |