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:
the_undefined 2009-01-26 18:50:09 +00:00
parent 1895f1c3be
commit 27065d7aab
2 changed files with 4 additions and 1 deletions

View file

@ -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;

View file

@ -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