mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Re-generate session ID on a successful login to avoid session fixation
This commit is contained in:
parent
62480a449e
commit
ff9b30ec40
@ -1361,6 +1361,7 @@ function session_auth() {
|
||||
$authcfg = auth_get_authserver($config['system']['webgui']['authmode']);
|
||||
if (authenticate_user($_POST['usernamefld'], $_POST['passwordfld'], $authcfg) ||
|
||||
authenticate_user($_POST['usernamefld'], $_POST['passwordfld'])) {
|
||||
session_regenerate_id();
|
||||
$_SESSION['Logged_In'] = "True";
|
||||
$_SESSION['Username'] = $_POST['usernamefld'];
|
||||
$_SESSION['last_access'] = time();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user