MAPG-235 refactored challenge token generation and check
This commit is contained in:
1 parent
1c1e5f051d
commit
28165d76d3
2 files changed
+6
-9
No files matched your search
@@ -57,10 +57,8 @@ class UserInChallengeRepository
|
||||
}
|
||||
|
||||
// validate token string
|
||||
foreach (str_split($token_str) as $char) {
|
||||
if (!(('0' <= $char && $char <= '9') || ('a' <= $char && $char <= 'f'))) {
|
||||
return null;
|
||||
}
|
||||
if (!ctype_xdigit($token_str)) {
|
||||
return null;
|
||||
}
|
||||
// convert token to int
|
||||
$token = hexdec($token_str);
|
||||
|
||||
Reference in new issue
Block a user