##// END OF EJS Templates
validator: fix ASCII password check to verify if it can be *encoded* in ascii...
Mads Kiilerich -
r7959:88e0d0c0 default
parent child Browse files
Show More
@@ -235,7 +235,7 b' def ValidPassword():'
235
235
236 def _validate_python(self, value, state):
236 def _validate_python(self, value, state):
237 try:
237 try:
238 (value or '').decode('ascii')
238 (value or '').encode('ascii')
239 except UnicodeError:
239 except UnicodeError:
240 msg = self.message('invalid_password', state)
240 msg = self.message('invalid_password', state)
241 raise formencode.Invalid(msg, value, state,)
241 raise formencode.Invalid(msg, value, state,)
General Comments 0
You need to be logged in to leave comments. Login now