fixing vuln where someone could change his username after loging in and therefore login with any account
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
$_SESSION["needs_auth"]=true;
|
$_SESSION["needs_auth"]=true;
|
||||||
|
$_SESSION["logged_in"]=false;
|
||||||
$_SESSION["username"]=preg_replace("/[^a-z0-9_]/","",$_POST["username"]);
|
$_SESSION["username"]=preg_replace("/[^a-z0-9_]/","",$_POST["username"]);
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user