From ed3160a5ac5adb741bc9ddc13b17f568ba77be52 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 14 Jun 2023 18:30:25 +0200 Subject: [PATCH] Addet saftey stuf to prevent sql errors in /removeuser --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index dcc4993..9e5c43f 100644 --- a/main.py +++ b/main.py @@ -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()