Skip to content

Commit

Permalink
Regenerate session ID helps prevent Session Fixation
Browse files Browse the repository at this point in the history
  • Loading branch information
ignacionelson committed Jul 30, 2021
1 parent 1d90d54 commit 86b3a9f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/Classes/Auth.php
Expand Up @@ -49,6 +49,8 @@ private function login($user)
else {
$_SESSION['access'] = 'admin';
}

session_regenerate_id(true);
}

public function authenticate($username, $password)
Expand Down Expand Up @@ -399,6 +401,7 @@ public function logout($error_code = null)
header("Cache-control: private");
$_SESSION = array();
session_destroy();
session_regenerate_id(true);

global $hybridauth;
if (!empty($hybridauth)) {
Expand Down

0 comments on commit 86b3a9f

Please sign in to comment.