summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-21 14:15:38 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-21 14:15:38 +0100
commit3729b15a64ab8c07c617211634e089ce7cb65bfb (patch)
tree8b2edfae721c38cade17333a840ed09540aa05ba /synapse/api/auth.py
parentMerge commit '4325be1a5' into anoa/dinsic_release_1_21_x (diff)
parentFactor out `_send_dummy_event_for_room` (#8370) (diff)
downloadsynapse-3729b15a64ab8c07c617211634e089ce7cb65bfb.tar.xz
Merge commit '2983049a7' into anoa/dinsic_release_1_21_x
* commit '2983049a7':
  Factor out `_send_dummy_event_for_room` (#8370)
  Improve logging of state resolution (#8371)
  Fix bug which caused failure on join with malformed membership events (#8385)
  Use `async with` for ID gens (#8383)
  Don't push if an user account has expired (#8353)
  Do not check lint/test dependencies at runtime. (#8377)
  Add note to reverse_proxy.md about disabling Apache's mod_security2 (#8375)
  Changelog
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py

index 2cd3383f71..c6660fe687 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py
@@ -218,11 +218,7 @@ class Auth: # Deny the request if the user account has expired. if self._account_validity.enabled and not allow_expired: user_id = user.to_string() - expiration_ts = await self.store.get_expiration_ts_for_user(user_id) - if ( - expiration_ts is not None - and self.clock.time_msec() >= expiration_ts - ): + if await self.store.is_account_expired(user_id, self.clock.time_msec()): raise AuthError( 403, "User account has expired", errcode=Codes.EXPIRED_ACCOUNT )