More logging on password resets
authorMagnus Hagander <magnus@hagander.net>
Mon, 30 Oct 2017 14:22:37 +0000 (15:22 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 30 Oct 2017 14:23:54 +0000 (15:23 +0100)
pgweb/account/views.py

index 2a8566f842ed99a617eb09cfd29f1d82d80bab7c..6416b7bebbe4eeae6585e259da25b568f3d04370 100644 (file)
@@ -241,8 +241,8 @@ def resetpwd(request):
                        if u.password == OAUTH_PASSWORD_STORE:
                                return HttpServerError("This account cannot change password as it's connected to a third party login site.")
                except User.DoesNotExist:
-                       pass
-       log.info("Initiating password set from {0}".format(get_client_ip(request)))
+                       log.info("Attempting to reset password of {0}, user not found".format(request.POST['email']))
+       log.info("Initiating password set from {0} for {1}".format(get_client_ip(request), request.POST['email']))
        return authviews.password_reset(request, template_name='account/password_reset.html',
                                                                        email_template_name='account/password_reset_email.txt',
                                                                        post_reset_redirect='/account/reset/done/')