Fix SQLite query where underscore was an unintended wildcard

This commit is contained in:
Pasi Kallinen 2016-01-02 19:53:30 +02:00
parent 6753fd6eca
commit 3ebf583de9
1 changed files with 1 additions and 1 deletions

View 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) {