Skip to content

Commit

Permalink
Reset the $_SESSION variable if the session isn't started
Browse files Browse the repository at this point in the history
  • Loading branch information
SwenVanZanten committed Dec 6, 2019
1 parent 1d2c226 commit 2fcb2e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Saml2/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,11 @@ public static function isSessionStarted()
*/
public static function deleteLocalSession()
{
session_unset();

if (OneLogin_Saml2_Utils::isSessionStarted()) {
session_unset();
session_destroy();
} else {
$_SESSION = array();
}
}

Expand Down

0 comments on commit 2fcb2e9

Please sign in to comment.