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