Enforce a fixed key length for v2 tokens

This commit is contained in:
Jeremy Stretch
2025-10-02 15:26:22 -04:00
parent 1ee23ba6fa
commit 5dc48f3a88
3 changed files with 23 additions and 11 deletions

View File

@@ -10,4 +10,7 @@ OBJECTPERMISSION_OBJECT_TYPES = Q(
CONSTRAINT_TOKEN_USER = '$user'
# API tokens
TOKEN_KEY_LENGTH = 16
TOKEN_DEFAULT_LENGTH = 40
TOKEN_CHARSET = string.ascii_letters + string.digits