Skip to content

Commit

Permalink
Remove hashing by default for user logins. Auth drivers are now in co…
Browse files Browse the repository at this point in the history
…ntrol of this behavior. Fixes #3605
  • Loading branch information
zombor committed Jun 27, 2011
1 parent 8633708 commit 24073ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions classes/kohana/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ public function login($username, $password, $remember = FALSE)
if (empty($password))
return FALSE;

if (is_string($password))
{
// Create a hashed password
$password = $this->hash($password);
}

return $this->_login($username, $password, $remember);
}

Expand Down
6 changes: 6 additions & 0 deletions classes/kohana/auth/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public function __construct($config = array())
*/
protected function _login($username, $password, $remember)
{
if (is_string($password))
{
// Create a hashed password
$password = $this->hash($password);
}

if (isset($this->_users[$username]) AND $this->_users[$username] === $password)
{
// Complete the login
Expand Down

0 comments on commit 24073ab

Please sign in to comment.