Development

This commit is contained in:
Matthew Grotke 2026-06-08 01:19:29 -04:00
parent f011594b04
commit b4e773c7b2
5 changed files with 32 additions and 7 deletions

View file

@ -80,7 +80,10 @@ def _verify_credential(username, password, vlan_name):
return False
if row is None:
return False
if row['session_seconds'] > 0 and (row['date_set'] + row['session_seconds']) < int(time.time()):
now = int(time.time())
if row['session_seconds'] > 0 and (row['date_set'] + row['session_seconds']) < now:
return False
if row['expires_seconds'] > 0 and (row['date_set'] + row['expires_seconds']) < now:
return False
if row['digest_type'] == DIGEST_HASH_BCRYPT:
try: