diff options
author | Mathieu Velten <matmaul@gmail.com> | 2020-09-23 17:06:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 16:06:28 +0100 |
commit | 916bb9d0d15cf941e73b2e808c553a1edd1c2eb9 (patch) | |
tree | 9938653b43064cd6f66f6fb633f1f00cb24f1fd4 /synapse/api | |
parent | Fix missing null character check on guest_access room state (#8373) (diff) | |
download | synapse-916bb9d0d15cf941e73b2e808c553a1edd1c2eb9.tar.xz |
Don't push if an user account has expired (#8353)
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/auth.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 75388643ee..1071a0576e 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 ) |