##// END OF EJS Templates
settings: prevent form from updating w/post request fix #3944
lisaq -
r1037:67438aef default
parent child Browse files
Show More
@@ -30,6 +30,7 b' from recaptcha.client.captcha import sub'
30
30
31 from rhodecode.authentication.base import authenticate, HTTP_TYPE
31 from rhodecode.authentication.base import authenticate, HTTP_TYPE
32 from rhodecode.events import UserRegistered
32 from rhodecode.events import UserRegistered
33 from rhodecode.lib import helpers as h
33 from rhodecode.lib.auth import (
34 from rhodecode.lib.auth import (
34 AuthUser, HasPermissionAnyDecorator, CSRFRequired)
35 AuthUser, HasPermissionAnyDecorator, CSRFRequired)
35 from rhodecode.lib.base import get_ip_addr
36 from rhodecode.lib.base import get_ip_addr
@@ -285,6 +286,12 b' class LoginView(object):'
285 try:
286 try:
286 form_result = password_reset_form.to_python(
287 form_result = password_reset_form.to_python(
287 self.request.params)
288 self.request.params)
289 if h.HasPermissionAny('hg.password_reset.disabled')():
290 log.error('Failed attempt to reset password for %s.', form_result['email'] )
291 self.session.flash(
292 _('Password reset has been disabled.'),
293 queue='error')
294 return HTTPFound(self.request.route_path('reset_password'))
288 if captcha_active:
295 if captcha_active:
289 response = submit(
296 response = submit(
290 self.request.params.get('recaptcha_challenge_field'),
297 self.request.params.get('recaptcha_challenge_field'),
General Comments 0
You need to be logged in to leave comments. Login now