comparison roundup/cgi/client.py @ 1252:209a47ede743

allow blank passwords again [SF#619714]
author Richard Jones <richard@users.sourceforge.net>
date Tue, 08 Oct 2002 04:11:17 +0000
parents 6c24a86a12ae
children 77920c42aeb9
comparison
equal deleted inserted replaced
1251:347657425a10 1252:209a47ede743
1 # $Id: client.py,v 1.50 2002-10-07 00:52:51 richard Exp $ 1 # $Id: client.py,v 1.51 2002-10-08 04:11:17 richard Exp $
2 2
3 __doc__ = """ 3 __doc__ = """
4 WWW request handler (also used in the stand-alone server). 4 WWW request handler (also used in the stand-alone server).
5 """ 5 """
6 6
523 return 523 return
524 524
525 # make sure we're allowed to be here 525 # make sure we're allowed to be here
526 if not self.loginPermission(): 526 if not self.loginPermission():
527 self.make_user_anonymous() 527 self.make_user_anonymous()
528 raise Unauthorised, _("You do not have permission to login") 528 self.error_message.append(_("You do not have permission to login"))
529 return
529 530
530 # now we're OK, re-open the database for real, using the user 531 # now we're OK, re-open the database for real, using the user
531 self.opendb(self.user) 532 self.opendb(self.user)
532 533
533 # set the session cookie 534 # set the session cookie
534 self.set_cookie(self.user) 535 self.set_cookie(self.user)
535 536
536 def verifyPassword(self, userid, password): 537 def verifyPassword(self, userid, password):
537 ''' Verify the password that the user has supplied 538 ''' Verify the password that the user has supplied
538 ''' 539 '''
539 return password == self.db.user.get(self.userid, 'password') 540 stored = self.db.user.get(self.userid, 'password')
541 if password == stored:
542 return 1
543 if not password and not stored:
544 return 1
545 return 0
540 546
541 def loginPermission(self): 547 def loginPermission(self):
542 ''' Determine whether the user has permission to log in. 548 ''' Determine whether the user has permission to log in.
543 549
544 Base behaviour is to check the user has "Web Access". 550 Base behaviour is to check the user has "Web Access".

Roundup Issue Tracker: http://roundup-tracker.org/