Use hash_equals for comparing username in allow/deny rules
The comparison should happen in constant time to avoid possible leak of usernames in rules. Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
285e5623b6
commit
58245cb1cc
@ -306,7 +306,7 @@ function PMA_allowDeny($type)
|
||||
|
||||
// check for username
|
||||
if (($rule_data[1] != '%') //wildcarded first
|
||||
&& ($rule_data[1] != $username)
|
||||
&& (! hash_equals($rule_data[1], $username))
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user