Skip to content

Commit 3795f7d

Browse files
committed
token case sensitive
1 parent db22a14 commit 3795f7d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Models/UserIdentityModel.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,16 @@ public function getIdentityBySecret(string $type, ?string $secret): ?UserIdentit
120120
return null;
121121
}
122122

123-
return $this->where('type', $type)
123+
$identity = $this->where('type', $type)
124124
->where('secret', $secret)
125125
->first();
126+
127+
if($identity && strcmp($identity->secret,$secret) == 0)
128+
{
129+
return $identity;
130+
}
131+
132+
return null;
126133
}
127134

128135
/**

0 commit comments

Comments
 (0)