1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-07 22:41:18 +03:00

Do not check for token expiration from the database directly

This commit is contained in:
Quentin Gliech
2022-10-21 11:54:26 +02:00
parent cacc2d799b
commit 27ace2aaca
2 changed files with 99 additions and 101 deletions

View File

@ -102,9 +102,7 @@ pub async fn lookup_active_compat_access_token(
LEFT JOIN user_emails ue
ON ue.user_email_id = u.primary_user_email_id
WHERE ct.access_token = $1
AND (ct.expires_at IS NULL OR ct.expires_at > NOW())
AND cs.finished_at IS NULL
WHERE ct.access_token = $1 AND cs.finished_at IS NULL
"#,
token,
)