src/ircdb: checkPassword should return false when password is None instead of trying to continue with the check.

This commit is contained in:
James Vega 2005-10-14 12:58:41 +00:00
parent d074721603
commit 9c34b231aa
1 changed files with 2 additions and 0 deletions

View File

@ -255,6 +255,8 @@ class IrcUser(object):
def checkPassword(self, password):
"""Checks the user's password."""
if password is None:
return False
if self.hashed:
(salt, _) = self.password.split('|')
return (self.password == utils.saltHash(password, salt=salt))