Addet saftey stuf to prevent sql errors in /removeuser

This commit is contained in:
2000-Trek 2023-06-14 18:30:25 +02:00
parent 8f2f70403d
commit ed3160a5ac

View file

@ -66,7 +66,7 @@ def new_user():
@app.route("/removeuser", methods=['GET'])
def remove_user():
user_id = request.args.get("id")
user_id = '%s' % request.args.get("id")
c.execute(f"DELETE * FROM tags WHERE (userid = {user_id}) ") #Ist hier noch eine Bestätigung nötig?
c.execute(f"DELETE * FROM users WHERE (id={user_id})")
conn.commit()