Adding 'safe string cmp' to API

This commit is contained in:
Your Name 2026-04-23 16:23:59 +02:00
parent 5e5629cd7a
commit dec5a82077
4 changed files with 31 additions and 5 deletions

View file

@ -293,7 +293,7 @@ def setRestAPILog():
# Generic functions
def is_admin(token):
return DataStore.admin_token == token
return safeCompareStrings(DataStore.admin_token, token)
@hook('before_request')
def check_authentication():