diff options
Diffstat (limited to 'auth_backend.py')
| -rw-r--r-- | auth_backend.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/auth_backend.py b/auth_backend.py index e1ac01c..7219931 100644 --- a/auth_backend.py +++ b/auth_backend.py @@ -5,6 +5,7 @@ import re import sqlite3 import subprocess import sys +import uuid from pathlib import Path from typing import Callable, Optional, Protocol @@ -69,10 +70,10 @@ class LocalMojicryptAuthBackend: with self.connect_db() as conn: conn.execute( """ - INSERT INTO users (username, role, encrypted_challenge, created_at) - VALUES (?, ?, ?, CURRENT_TIMESTAMP) + INSERT INTO users (user_uuid, username, role, encrypted_challenge, created_at) + VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP) """, - (username, role, encrypted), + (str(uuid.uuid4()), username, role, encrypted), ) return True, "user created" except sqlite3.IntegrityError: |
