diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-10-16 15:05:00 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-10-16 15:05:00 +0000 |
commit | 2db88fcaf25e6cfb37aa33fb7478676c3d30889f (patch) | |
tree | 59c5f60d11b2a43e273625d3b1a7e36b19af578d /src/hostserv.c | |
parent | 6e77a5d94d554398b2d6965597da9d94bdb3a8f5 (diff) |
BUILD : 1.7.16 (1175) BUGS : 612 NOTES : Fixed a number of MySQL/RDB-related functions which did not correctly escape their arguments
git-svn-id: svn://svn.anope.org/anope/trunk@1175 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@896 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/hostserv.c')
-rw-r--r-- | src/hostserv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hostserv.c b/src/hostserv.c index d089f5e73..d8c8af96b 100644 --- a/src/hostserv.c +++ b/src/hostserv.c @@ -318,6 +318,7 @@ void delHostCore(char *nick) { #ifdef USE_RDB static char clause[128]; + char *q_nick; #endif HostCore *tmp; boolean found = false; @@ -328,10 +329,11 @@ void delHostCore(char *nick) #ifdef USE_RDB /* Reflect this change in the database right away. */ if (rdb_open()) { - - snprintf(clause, sizeof(clause), "nick='%s'", nick); + q_nick = rdb_quote(nick); + snprintf(clause, sizeof(clause), "nick='%s'", q_nick); rdb_scrub_table("anope_hs_core", clause); rdb_close(); + free(q_nick); } #endif |