Added safty

This commit is contained in:
2000-Trek 2023-06-23 19:17:29 +02:00
parent 3dcc985087
commit 4d0f7b57bd

View file

@ -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 <a href="/list">user and tag list</a>'