Merge pull request #2618 from matrix-org/dbkr/log_login_requests

Log login requests
This commit is contained in:
David Baker 2017-11-01 14:11:28 +00:00 committed by GitHub
commit 691cc4e036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -166,6 +166,16 @@ class LoginRestServlet(ClientV1RestServlet):
Returns:
(int, object): HTTP code/response
"""
# Log the request we got, but only certain fields to minimise the chance of
# logging someone's password (even if they accidentally put it in the wrong
# field)
logger.info(
"Got login request with identifier: %r, medium: %r, address: %r, user: %r",
login_submission.get('identifier'),
login_submission.get('medium'),
login_submission.get('address'),
login_submission.get('user'),
)
login_submission_legacy_convert(login_submission)
if "identifier" not in login_submission: