mirror of https://github.com/itflow-org/itflow
Remove CSRF check
This commit is contained in:
parent
2c534d4d20
commit
d122d90a47
|
|
@ -126,15 +126,8 @@ if (isset($_POST['add_database'])) {
|
|||
|
||||
}
|
||||
|
||||
<?php
|
||||
if (isset($_POST['restore'])) {
|
||||
|
||||
// ---------- Optional CSRF check (requires a hidden "csrf" in your restore form) ----------
|
||||
if (!hash_equals($_SESSION['csrf'] ?? '', $_POST['csrf'] ?? '')) {
|
||||
http_response_code(403);
|
||||
exit("Invalid CSRF token.");
|
||||
}
|
||||
|
||||
// ---------- Inline helpers (guarded) ----------
|
||||
if (!function_exists('recursiveCopy')) {
|
||||
function recursiveCopy(string $src, string $dst): void {
|
||||
|
|
|
|||
Loading…
Reference in New Issue