Skip to content

Commit

Permalink
Fix: Escape chars for name comparsion in sql query (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov authored Dec 5, 2023
1 parent 1f649e4 commit 08cb942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cstrike/addons/amxmodx/scripting/CA_Storage_GameCMS.sma
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ GameCMS_GetAdminID(const id) {
new name_safe[MAX_NAME_LENGTH * 2]
SQL_QuoteString(Empty_Handle, name_safe, charsmax(name_safe), name)

formatex(g_query, charsmax(g_query), "SELECT id FROM admins WHERE (name = '%s' or name = '%s') LIMIT 1;",
formatex(g_query, charsmax(g_query), "SELECT id FROM admins WHERE (name = '%s' or name = \"%s\") LIMIT 1;",
authID, name_safe
)

Expand Down

0 comments on commit 08cb942

Please sign in to comment.