micro/filter/AccessFilter.php 1 location
|
@@ 29-36 (lines=8) @@
|
26 |
|
|
27 |
|
if ($res === true) { |
28 |
|
return true; |
29 |
|
} elseif ($res === false) { |
30 |
|
$this->result = [ |
31 |
|
'redirect' => !empty($rule['redirect']) ? $rule['redirect'] : null, |
32 |
|
'message' => !empty($rule['message']) ? $rule['message'] : 'Access denied!' |
33 |
|
]; |
34 |
|
|
35 |
|
return false; |
36 |
|
} elseif ($res === null) { |
37 |
|
continue; |
38 |
|
} |
39 |
|
} |
micro/filter/CsrfFilter.php 1 location
|
@@ 30-37 (lines=8) @@
|
27 |
|
|
28 |
|
$postCSRF = $this->container->request->post('csrf'); |
29 |
|
|
30 |
|
if (!$postCSRF) { |
31 |
|
$this->result = [ |
32 |
|
'redirect' => !empty($rule['redirect']) ? $rule['redirect'] : null, |
33 |
|
'message' => !empty($rule['message']) ? $rule['message'] : 'Not allowed!' |
34 |
|
]; |
35 |
|
|
36 |
|
return false; |
37 |
|
} |
38 |
|
|
39 |
|
$csrf = $this->container->session->csrf; |
40 |
|
|