1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:24:49 +02:00

Fix an escaped value that wasn't escaped enough in chanstats.

This commit is contained in:
Sadie Powell
2026-05-26 10:36:50 +01:00
parent e23ea8f8ea
commit 2327c6ac9a
+4 -2
View File
@@ -343,14 +343,16 @@ class MChanstats : public Module
"(nick_, '', 'total'), (nick_, '', 'monthly')," "(nick_, '', 'total'), (nick_, '', 'monthly'),"
"(nick_, '', 'weekly'), (nick_, '', 'daily');" "(nick_, '', 'weekly'), (nick_, '', 'daily');"
"END IF;" "END IF;"
"SET @echan = chan_;"
"SET @enick = nick_;"
"SET @update_query = CONCAT('UPDATE `" + prefix + "chanstats` SET line=line+', line_, '," "SET @update_query = CONCAT('UPDATE `" + prefix + "chanstats` SET line=line+', line_, ',"
"letters=letters+', letters_, ' , words=words+', words_, ', actions=actions+', actions_, ', " "letters=letters+', letters_, ' , words=words+', words_, ', actions=actions+', actions_, ', "
"smileys_happy=smileys_happy+', sm_h_, ', smileys_sad=smileys_sad+', sm_s_, ', " "smileys_happy=smileys_happy+', sm_h_, ', smileys_sad=smileys_sad+', sm_s_, ', "
"smileys_other=smileys_other+', sm_o_, ', kicks=kicks+', kicks_, ', kicked=kicked+', kicked_, ', " "smileys_other=smileys_other+', sm_o_, ', kicks=kicks+', kicks_, ', kicked=kicked+', kicked_, ', "
"modes=modes+', modes_, ', topics=topics+', topics_, ', ', time_ , '=', time_, '+', line_ ,' " "modes=modes+', modes_, ', topics=topics+', topics_, ', ', time_ , '=', time_, '+', line_ ,' "
"WHERE (nick='''' OR nick=''', nick_, ''') AND (chan='''' OR chan=''', chan_, ''')');" "WHERE (nick='''' OR nick=?) AND (chan='''' OR chan=?)');"
"PREPARE update_query FROM @update_query;" "PREPARE update_query FROM @update_query;"
"EXECUTE update_query;" "EXECUTE update_query using @enick, @echan;"
"DEALLOCATE PREPARE update_query;" "DEALLOCATE PREPARE update_query;"
"END"; "END";
this->RunQuery(query); this->RunQuery(query);