@@ -50,23 +50,23 @@ |
||
50 | 50 | Handle CASES |
51 | 51 | */ |
52 | 52 | switch (filter_input(INPUT_POST, 'type', FILTER_SANITIZE_STRING)) { |
53 | -case "checkSessionExists": |
|
54 | - // Case permit to check if SESSION is still valid |
|
55 | - session_start(); |
|
56 | - if (isset($_SESSION['CPM']) === true) { |
|
57 | - echo "1"; |
|
58 | - } else { |
|
59 | - // In case that no session is available |
|
60 | - // Force the page to be reloaded and attach the CSRFP info |
|
61 | - |
|
62 | - // Load CSRFP |
|
63 | - $csrfp_array = include '../includes/libraries/csrfp/libs/csrfp.config.php'; |
|
64 | - |
|
65 | - // Send back CSRFP info |
|
66 | - echo $csrfp_array['CSRFP_TOKEN'].";".filter_input(INPUT_POST, $csrfp_array['CSRFP_TOKEN'], FILTER_SANITIZE_STRING); |
|
67 | - } |
|
53 | + case "checkSessionExists": |
|
54 | + // Case permit to check if SESSION is still valid |
|
55 | + session_start(); |
|
56 | + if (isset($_SESSION['CPM']) === true) { |
|
57 | + echo "1"; |
|
58 | + } else { |
|
59 | + // In case that no session is available |
|
60 | + // Force the page to be reloaded and attach the CSRFP info |
|
61 | + |
|
62 | + // Load CSRFP |
|
63 | + $csrfp_array = include '../includes/libraries/csrfp/libs/csrfp.config.php'; |
|
64 | + |
|
65 | + // Send back CSRFP info |
|
66 | + echo $csrfp_array['CSRFP_TOKEN'].";".filter_input(INPUT_POST, $csrfp_array['CSRFP_TOKEN'], FILTER_SANITIZE_STRING); |
|
67 | + } |
|
68 | 68 | |
69 | - break; |
|
69 | + break; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |