##// END OF EJS Templates
login: Make register views more robust if some POST parameters are missing....
Martin Bornhold -
r1065:64aae6b3 default
parent child Browse files
Show More
@@ -172,7 +172,7 b' class LoginView(object):'
172 except formencode.Invalid as errors:
172 except formencode.Invalid as errors:
173 defaults = errors.value
173 defaults = errors.value
174 # remove password from filling in form again
174 # remove password from filling in form again
175 del defaults['password']
175 defaults.pop('password', None)
176 render_ctx = self._get_template_context()
176 render_ctx = self._get_template_context()
177 render_ctx.update({
177 render_ctx.update({
178 'errors': errors.error_dict,
178 'errors': errors.error_dict,
@@ -260,8 +260,8 b' class LoginView(object):'
260 raise HTTPFound(redirect_ro)
260 raise HTTPFound(redirect_ro)
261
261
262 except formencode.Invalid as errors:
262 except formencode.Invalid as errors:
263 del errors.value['password']
263 errors.value.pop('password', None)
264 del errors.value['password_confirmation']
264 errors.value.pop('password_confirmation', None)
265 return self.register(
265 return self.register(
266 defaults=errors.value, errors=errors.error_dict)
266 defaults=errors.value, errors=errors.error_dict)
267
267
General Comments 0
You need to be logged in to leave comments. Login now