X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=conf%2Fauth%2Fphpbb.py;h=54763b3558731a9db66e165c7583a145a973ea2c;hb=6143b643c63de8726c8858466aafe6b0b56546bf;hp=4fc06b9e63fbbfccba20bb8d663fda65bb3edc73;hpb=d0bdd58eaa599fe9fcf5625b868187e07dc6cd09;p=matthijs%2Fprojects%2Fwipi.git diff --git a/conf/auth/phpbb.py b/conf/auth/phpbb.py index 4fc06b9..54763b3 100644 --- a/conf/auth/phpbb.py +++ b/conf/auth/phpbb.py @@ -207,7 +207,7 @@ class PhpbbAuth(BaseAuth): conn = connect(**self.dbconfig) if not conn: - return False + return (False, False) # Get some data. Note that we interpolate the prefix ourselves, since # letting the mysql library do it only works with values (it adds '' @@ -218,12 +218,12 @@ class PhpbbAuth(BaseAuth): # case insensitive collaction for the username field, so # usernames are checked in case insensitive manner. cursor = conn.cursor () - cursor.execute ("SELECT user_password,user_email,username FROM `%susers` WHERE username=%%s" % self.dbconfig['phpbb_prefix'], username) + cursor.execute ("SELECT user_password,user_email,username FROM `%susers` WHERE LOWER(username)=LOWER(%%s)" % self.dbconfig['phpbb_prefix'], username) # No data? No login. if (cursor.rowcount == 0): conn.close() - return False + return (False, False) # Check password row = cursor.fetchone()