Conditions | 4 |
Paths | 4 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | public function handle(ServerRequestInterface $request) |
||
38 | { |
||
39 | if (services()->has('csrfProtection')) { |
||
40 | if (hash_equals(input()->server('REQUEST_METHOD'), 'POST')) { |
||
41 | if ( ! services()->get('csrfProtection')->verify()) { |
||
42 | output()->sendError(403, [ |
||
43 | 'message' => language()->getLine('403_INVALID_CSRF'), |
||
44 | ]); |
||
49 | } |