diff --git a/index.php b/index.php index 9877be3..4284189 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,11 @@ session_set_cookie_params([ 'secure' => true, 'samesite' => 'Lax' ]); + session_start(); +if(!isset($_SESSION['csrf']) || strlen($_SESSION['csrf'] != 64)) { + $_SESSION['csrf'] = bin2hex(random_bytes(32)); +} include_once 'classen/MAIL/PHPMailer.php'; include_once 'classen/MAIL/SMTP.php';