Commit a9944c21 authored by P. J. McDermott's avatar P. J. McDermott

Compare lowercase usernames in 1.1 handshake.

This should fix bug #451, where a protocol 1.1 client gets BADUSER with
a mixed-case or uppercase username.
parent b5e64dba
......@@ -44,7 +44,7 @@ $timestamp = time();
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
try {
$row = $adodb->GetRow('SELECT uniqueid,password FROM Users WHERE lower(username) = ' . $adodb->qstr($username));
$row = $adodb->GetRow('SELECT uniqueid,password FROM Users WHERE lower(username) = lower(' . $adodb->qstr($username) . ')');
} catch (Exception $e) {
die('FAILED ' . $e->getMessage() . "\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment