Generate CSRF token on session start
							parent
							
								
									c78e7e2007
								
							
						
					
					
						commit
						a446cfd9c1
					
				|  | @ -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'; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Anonymous Contributor
						Anonymous Contributor