Adding CSRF to file manager

This commit is contained in:
Noah van der Aa 2019-01-23 17:44:04 +01:00 committed by GitHub
parent e537e06118
commit bc4a8a4d7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,7 @@ if($_SERVER['REQUEST_METHOD']==='POST'){
} }
if($ok){ if($ok){
$_SESSION['hosting_username']=$username; $_SESSION['hosting_username']=$username;
$_SESSION['csrf_token']=sha1(uniqid());
session_write_close(); session_write_close();
header('Location: home.php'); header('Location: home.php');
exit; exit;