From 1032a1f9f12ba71000fca3090d0fa9d24e51b1ae Mon Sep 17 00:00:00 2001 From: Jackz Date: Thu, 15 Feb 2024 09:00:28 -0600 Subject: [PATCH] use db.Format methods --- plugins/globalbans.smx | Bin 8246 -> 8422 bytes scripting/globalbans.sp | 36 +++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/plugins/globalbans.smx b/plugins/globalbans.smx index ffb780b1e0634d2e86497548e71a803551ef766a..bb48fe366a4ad1b0792d0bb2972b80830f55e6ae 100644 GIT binary patch delta 8281 zcmX|`WmHt}7w?Del5P-bq&uY%6a)lBN^(Xzhh~tJZjcg?QaXn2972cgW+-uJBpl+- z?|<*QFFyPGeb(7~KWCq{_N&wUVow>Oq4CBL69Z$94FI5W1^_7U006)U20Hvd4HX0c zaM4~%7yzha004;5{ze-Ba7QaO8jubEAdOZQG=*s2i&kzlA6@|fztDx~a=>##03ZV0 z^S`|Mw*UYVt?Fpdw3Dxzmu6>V^@VX zWbdIMndgU&w^$1b8HX&4{Bv{PT#qV1Q`yIE4acCvO@@tZ#ny9_&k9!vXzl3Iba##XND-JbeSoSA5N`*v$)m1xciq@tk z`Np+pXq-UR49j2=m$$0pjv$x>bmsr2MP21YfsIr4kRueQRv$>B%rNPS7A|L z6;-+FqI}5Aq#y{CB@P{DSpLJX>_c+&HOkniDBG8$+Cp`urijD|#QVSbH2&+4p3Dsd zY7vK4&@hx59TQxLwVTo8Z4ZF={znK{qTI3Cp-*RH^%e zscTT}6V|W0%}J;gZP$~XpVOT~o^Jd;Kp=JV^RvdacHrqv-7%$kOP@zB?eI8Y1?ed@N ztnapoq8c4!Lwm}**NlxsyTP30`VVlUw7b{8_$}ApZktrb)@HTICkfGvM!P7&?x26# z%yx&5_AwgFV?6NQky^dofh?><`+p5t@%gp)KwaspSX++z9mmH~@I2|7=E;3pUM)^A zN%AMhsGd(wjX5;-rS6dR2M#wARX^PR%8MTmDL$g#O2gi3cZ)883+CCWc(Be;SSQPc zSN?h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-HNt@4AT7aTd%?GvD%vQx!Ru-l{4{0}Baq3&k0KKOVqm>!ESBx*py8 zXD%{$Us|>n#k9(I37M)4?LzV!^HzRIfain##6UC*J*xYD*0XJpj64JO0RL_1Gt1b{ zSVODF&&FY?%zfpI2V%Y`Ne|II-#XoS$5J1fC`Uv<=W zbKZ&%PmNTOu7sPR25EeflCHZo6#KB@NYcX#iSI%-!F}J=>Sti$Iy3b~bVlkkEg3qq zJS#hypNwP{FyL^{U(1S(!h#1`!&i4sh1l{`endk`C27&i?8Fx&zm+U`AVDk6rQ*XL zPin;-slp8P9F_HJvwAOT?4I1{N%>nK@u@Nsi#zdhd$0#h2R$0Ucd_F7!IU+gcP>Q@ zQXf_mVrP5H-Py~p$TvGjM|OOi8uqiac-~z?y|n9B;sEkAz0!xj(|9LnF)01OQw9@I z@W{t51qm#78#W3h%H0#>cvD$^Kj6AO&O!aRA-XW9ceInvLKTz`6i6|1Aq+`~_J!1v z(HC~^Th^wkf{HCDpJ1)IhF^`^+Oa~V56 zJ2`!b1)7{#1yE=obID2_URKk*?~SrTYxQ~R5FJ$U3Ljt^BFm3=*;O^G%)RCXv!!0r zkClfGw3o!21qVowF=2ly3NA!sN5v!nTnrSPUX_mO;xfViI0VBL^yI^hf`*EE`idsV^v$TOO8Yn#CaejcU9gkyIS$ZY zC1!^aW#F8%IBkGRqErZuf7!nmb^0zpdXU|<)6$QzHLy*H+=%Ioc5ah?GV+N}WnAd~ zt=+XpU`P?O+mX{Av1#vzxMIUN>S|W@exYoYn?N!hCPlz 0) { @@ -152,12 +156,19 @@ public Action OnBanClient(int client, int time, int flags, const char[] reason, Format(expiresDate, sizeof(expiresDate), "NULL"); } - g_db.Format(query, sizeof(query), "INSERT INTO bans" + int size = 2*strlen(reason)+1; + char[] reasonEscaped = new char[size]; + g_db.Escape(reason, reasonEscaped, size); + + int querySize = 256 + size; + char[] query = new char[querySize]; + + g_db.Format(query, querySize, "INSERT INTO bans" ..."(steamid, ip, reason, public_message, expires, executor, flags, timestamp)" ..."VALUES ('%s', '%s', '%s', '%s', %s, '%s', %d, UNIX_TIMESTAMP())", identity, ip, - reason, + reasonEscaped, kick_message, expiresDate, executor, @@ -169,14 +180,12 @@ public Action OnBanClient(int client, int time, int flags, const char[] reason, IntToString(key, strKey, sizeof(strKey)); pendingInsertQueries.SetString(strKey, query); - g_db.Format(query, sizeof(query), "SELECT `flags` FROM `bans` WHERE `expired` = 0 AND `steamid` LIKE 'STEAM_%%:%%:%s' OR ip = '%s'", identity[10], identity); + g_db.Format(query, querySize, "SELECT `flags` FROM `bans` WHERE `expired` = 0 AND `steamid` LIKE 'STEAM_%%:%%:%s' OR ip = '%s'", identity[10], identity); g_db.Query(DB_OnBanPreCheck, query, key); PrintToServer("Adding %N to OnBanClient queue. Key: %d", client, key); - // TODO: REMOVE : FOR DEBUG return Plugin_Handled; - return Plugin_Continue; } @@ -219,15 +228,16 @@ public void DB_OnBanPreCheck(Database db, DBResultSet results, const char[] erro public void DB_OnConnectCheck(Database db, DBResultSet results, const char[] error, int user) { int client = GetClientOfUserId(user); + if(client == 0) return; if(db == INVALID_HANDLE || results == null) { LogError("DB_OnConnectCheck returned error: %s", error); - if(client > 0 && hKickType.IntValue == 2) { + if(hKickType.IntValue == 2) { KickClient(client, "Could not authenticate at this time."); LogMessage("Could not connect to database to authorize user '%N' (#%d)", client, user); } } else { //No failure, check the data. - while(client > 0 && results.FetchRow()) { //Is there a ban found? + while(results.FetchRow()) { //Is there a ban found? static char reason[255], steamid[64], public_message[255]; DBResult colResult;