Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Simplify medium and address assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Jun 25, 2020
1 parent cb272bc commit af21fbb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions synapse/rest/client/v1/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,8 @@ async def _do_other_login(self, login_submission):

# Check whether this attempt uses a threepid, if so, check if our failed attempt
# ratelimiter allows another attempt at this time
medium, address = (
login_submission.get("medium"),
login_submission.get("address"),
)
medium = login_submission.get("medium")
address = login_submission.get("address")
if medium and address:
self._failed_attempts_ratelimiter.ratelimit(
(medium, address.lower()), update=False
Expand Down

0 comments on commit af21fbb

Please sign in to comment.