corrade-http-templates – Diff between revs 4 and 50
?pathlinks?
Rev 4 | Rev 50 | |||
---|---|---|---|---|
Line 16... | Line 16... | |||
16 | |
16 | |
|
17 | ########################################################################### |
17 | ########################################################################### |
|
18 | ## INTERNALS ## |
18 | ## INTERNALS ## |
|
Line -... | Line 19... | |||
- | 19 | ########################################################################### |
||
- | 20 | |
||
- | 21 | # CRSF. |
||
- | 22 | session_start(); |
||
- | 23 | if (empty($_POST['token']) || !hash_equals($_SESSION['token'], $_POST['token'])) { |
||
- | 24 | http_response_code(403); |
||
- | 25 | die('Forbidden.'); |
||
19 | ########################################################################### |
26 | } |
|
20 | |
27 | |
|
21 | # Check that we have all the necessary variables. |
28 | # Check that we have all the necessary variables. |
|
22 | if(!isset($_POST['message']) || |
29 | if(!isset($_POST['message']) || |
|
23 | empty($_POST['message']) || |
30 | empty($_POST['message']) || |