diff options
author | David Baker <dave@matrix.org> | 2017-11-01 13:58:01 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2017-11-01 13:58:01 +0000 |
commit | 59e7e62c4ba24d245b5a4855cd08c583a997e968 (patch) | |
tree | a3355b9a5944c98e5ef2f037cf78fe763833cc29 /synapse/rest/client | |
parent | Merge pull request #2612 from matrix-org/luke/groups-room-relationship-is-public (diff) | |
download | synapse-59e7e62c4ba24d245b5a4855cd08c583a997e968.tar.xz |
Log login requests
Carefully though, to avoid logging passwords
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/v1/login.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index d24590011b..7c8240a6d7 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -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: |