mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
Stop putting a time caveat on access tokens
The 'time' caveat on the access tokens was something of a lie, since we weren't enforcing it; more pertinently its presence stops us ever adding useful time caveats. Let's move in the right direction by not lying in our caveats.
This commit is contained in:
parent
b6146537d2
commit
1c4f05db41
7 changed files with 17 additions and 33 deletions
|
@ -810,6 +810,10 @@ class Auth(object):
|
|||
else:
|
||||
v.satisfy_general(lambda c: c.startswith("time < "))
|
||||
|
||||
# access_tokens and refresh_tokens include a nonce for uniqueness: any
|
||||
# value is acceptable
|
||||
v.satisfy_general(lambda c: c.startswith("nonce = "))
|
||||
|
||||
v.verify(macaroon, self.hs.config.macaroon_secret_key)
|
||||
|
||||
def _verify_expiry(self, caveat):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue