From cf9a85599211957d5971b16f625d2fb51b785aea Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Wed, 29 Jan 2020 08:02:36 +0300 Subject: [PATCH] v3.12.2.2 Change log: https://haproxy-wi.org/changelog.py#3_12_2_2 --- app/sql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/sql.py b/app/sql.py index f2dde459..b2947e2c 100644 --- a/app/sql.py +++ b/app/sql.py @@ -442,11 +442,12 @@ def get_user_name_by_uuid(uuid): return user_id[0] cur.close() con.close() + def get_user_role_by_uuid(uuid): con, cur = get_cur() try: - cur.execute("select role.id from user left join uuid as uuid on user.id = uuid.user_id left join role on role.name = user.role where uuid.uuid = '%s'" % uuid) + cur.execute("select role.id from user left join uuid as uuid on user.id = uuid.user_id left join role on role.name = user.role where uuid.uuid = ?", (uuid,)) except sqltool.Error as e: out_error(e) else: