Skip to content

Commit

Permalink
Merge pull request SAML-Toolkits#414 from SwenVanZanten/master
Browse files Browse the repository at this point in the history
Reset the $_SESSION variable if the session isn't started
  • Loading branch information
pitbulk authored Dec 6, 2019
2 parents cc4d849 + 2fcb2e9 commit f9960d9
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 f9960d9

Please sign in to comment.