1
0
Fork 0

Check if CSRF token is available before replacing

master
Anonymous Contributor 2023-08-23 18:16:34 +02:00
parent d81e48fc12
commit 1f82e33c54
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@
$this->FertigesHTML = str_replace("%%GET_IP%%", @$_SERVER["REMOTE_ADDR"], $this->FertigesHTML);
// Add CSRF token
$this->FertigesHTML = str_replace("%%CSRF%%", '<input type="hidden" name="csrf" value="'.$_SESSION['csrf'].'">', $this->FertigesHTML);
$this->FertigesHTML = str_replace("%%CSRF%%", '<input type="hidden" name="csrf" value="'.(isset($_SESSION['csrf']) ? $_SESSION['csrf'] : '').'">', $this->FertigesHTML);
$this->isBuild = true;
}