mirror of https://github.com/itflow-org/itflow
SQL Escape tech username in session. The username is added to most log entries meaning that a simple apostrophe in the name breaks all logging for the user
This commit is contained in:
parent
019776f538
commit
24f825ca08
|
|
@ -59,12 +59,12 @@ if(isset($_POST['login'])){
|
|||
|
||||
// User variables
|
||||
$token = $row['user_token'];
|
||||
$user_name = $row['user_name'];
|
||||
$user_name = strip_tags(mysqli_real_escape_string($mysqli, $row['user_name']));
|
||||
$user_id = $row['user_id'];
|
||||
|
||||
// Session info
|
||||
$_SESSION['user_id'] = $row['user_id'];
|
||||
$_SESSION['user_name'] = $row['user_name'];
|
||||
$_SESSION['user_id'] = $user_id;
|
||||
$_SESSION['user_name'] = $user_name;
|
||||
$_SESSION['user_role'] = $row['user_role'];
|
||||
$_SESSION['csrf_token'] = bin2hex(random_bytes(78));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue