]> skyeroc.xyz Git - dgamelaunch/commitdiff
Fix SQLite query where underscore was an unintended wildcard
authorPasi Kallinen <paxed@alt.org>
Sat, 2 Jan 2016 17:53:30 +0000 (19:53 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 2 Jan 2016 17:53:37 +0000 (19:53 +0200)
dgamelaunch.c

index a52812d7cabc9cd7ff046e86c52663281c1fe15b..df0d72b7156cfbb4d0b334973a91b4366b485cac 100644 (file)
@@ -2266,7 +2266,7 @@ userexist (char *cname, int isnew)
     if (isnew && (strlen(cname) >= globalconfig.max_newnick_len))
        strcat(tmpbuf, "%");
 
-    qbuf = sqlite3_mprintf("select * from dglusers where username like '%q' limit 1", tmpbuf);
+    qbuf = sqlite3_mprintf("select * from dglusers where username = '%q' collate nocase limit 1", tmpbuf);
 
     ret = sqlite3_open(globalconfig.passwd, &db);
     if (ret) {