mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixed bug in AuthComponent that allowed uppercase actions to pass checks
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8011 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
1895f1c3be
commit
27065d7aab
2 changed files with 4 additions and 1 deletions
|
@ -265,7 +265,7 @@ class AuthComponent extends Object {
|
|||
$isErrorOrTests = (
|
||||
strtolower($controller->name) == 'cakeerror' ||
|
||||
(strtolower($controller->name) == 'tests' && Configure::read() > 0) ||
|
||||
!in_array($controller->params['action'], $controller->methods)
|
||||
!in_array(strtolower($controller->params['action']), $controller->methods)
|
||||
);
|
||||
if ($isErrorOrTests) {
|
||||
return true;
|
||||
|
|
|
@ -651,6 +651,9 @@ class AuthTest extends CakeTestCase {
|
|||
|
||||
$this->Controller->params['action'] = 'add';
|
||||
$this->assertFalse($this->Controller->Auth->startup($this->Controller));
|
||||
|
||||
$this->Controller->params['action'] = 'Add';
|
||||
$this->assertFalse($this->Controller->Auth->startup($this->Controller));
|
||||
}
|
||||
/**
|
||||
* testLoginRedirect method
|
||||
|
|
Loading…
Add table
Reference in a new issue