Skip to content

Commit 8e07bb8

Browse files
authored
Update class.security.php
1 parent 4e65ccb commit 8e07bb8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ELI/classes/class.security.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function encrypt($text,$return=true){
2727

2828
function decrypt($token,$return=true){
2929

30-
if(strlen(trim($token)) > 0){
30+
if(isset($token) && strlen(trim($token)) > 0){
3131
$sn = -1;
3232
$splitnumber = substr($token,-32);
3333
if(strlen($splitnumber)==32){
@@ -87,7 +87,7 @@ function csrf()
8787

8888
function check_csrf($csrf_got)
8989
{
90-
if ($_SESSION['token'] == self::decrypt($csrf_got))
90+
if($_SESSION['token'] == self::decrypt($csrf_got) OR $_SESSION['token'] == $csrf_got)
9191
{
9292
return TRUE;
9393
}

0 commit comments

Comments
 (0)