mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 01:52:40 +00:00
Making AuthComponent::deny() case insensitive like allow(). Fixes #6261
This commit is contained in:
parent
c84b4cf36d
commit
b4a1c4723d
2 changed files with 19 additions and 2 deletions
|
@ -605,7 +605,7 @@ class AuthComponent extends Object {
|
|||
if (isset($args[0]) && is_array($args[0])) {
|
||||
$args = $args[0];
|
||||
}
|
||||
$this->allowedActions = array_merge($this->allowedActions, $args);
|
||||
$this->allowedActions = array_merge($this->allowedActions, array_map($args, 'strtolower'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ class AuthComponent extends Object {
|
|||
$args = $args[0];
|
||||
}
|
||||
foreach ($args as $arg) {
|
||||
$i = array_search($arg, $this->allowedActions);
|
||||
$i = array_search(strtolower($arg), $this->allowedActions);
|
||||
if (is_int($i)) {
|
||||
unset($this->allowedActions[$i]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue