##// END OF EJS Templates
fixed a bug when given wrong username at login...
marcink -
r458:00f883ab default
parent child Browse files
Show More
@@ -95,11 +95,8 b' class ValidAuth(formencode.validators.Fa'
95 def validate_python(self, value, state):
95 def validate_python(self, value, state):
96 password = value['password']
96 password = value['password']
97 username = value['username']
97 username = value['username']
98 try:
98 user = UserModel().get_user_by_name(username)
99 user = UserModel().get_user_by_name(username)
99 if user is None:
100 except (NoResultFound, MultipleResultsFound, OperationalError) as e:
101 log.error(e)
102 user = None
103 raise formencode.Invalid(self.message('invalid_password',
100 raise formencode.Invalid(self.message('invalid_password',
104 state=State_obj), value, state,
101 state=State_obj), value, state,
105 error_dict=self.e_dict)
102 error_dict=self.e_dict)
General Comments 0
You need to be logged in to leave comments. Login now