From 4d0f7b57bdbcb9d0dfc049ccee89b3de9b204ed8 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Fri, 23 Jun 2023 19:17:29 +0200 Subject: [PATCH] Added safty --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 98039cd..a5edf15 100644 --- a/main.py +++ b/main.py @@ -129,7 +129,7 @@ def adduser(): c.execute("INSERT or IGNORE INTO users (username, balance) VALUES (?, 0)", [username]) conn.commit() socketio.emit("update", "update") - c.execute(f"SELECT * FROM users WHERE username={username}") + c.execute(f"SELECT * FROM users WHERE username=?", [username]) user = c.fetchall()[0] db_log(f"Added user id: {user[0]} name: {user[2]}") return 'Added user user and tag list'