Add log message when password reset requested (#27886)

Logs an INFO message whenever a password reset email is generated.
The intent is to detect abuse of this feature.

SEG-48
This commit is contained in:
Mike OConnell
2021-06-09 11:05:31 -04:00
committed by GitHub
parent 5272556a90
commit d083912ff3

View File

@@ -726,6 +726,7 @@ def do_email_change_request(user, new_email, activation_key=None, secondary_emai
try:
ace.send(msg)
log.info("Email activation link sent to user [%s].", new_email)
except Exception:
from_address = configuration_helpers.get_value('email_from_address', settings.DEFAULT_FROM_EMAIL)
log.error('Unable to send email activation link to user from "%s"', from_address, exc_info=True)