[imp] case sensitivity with login

Kris Efland kris_efland at yahoo.com
Sat Jul 10 10:42:03 PDT 2004


Josh/Eric/Jason,
thanks for the help... got it working though i used some php to cut some corners.  Heres what I did:
 
doing search/replace for <pref_uid> in horde/lib/Prefs/sql.php... i swapped out the single lookup line with these two for each instance:
 
$query .= ' where LOWER(pref_uid) = ';
$query .= $this->db->quote(strtolower($this->user));

that way im safe on both sides. watch your spaces inside the ticks, the padding isn't uniform from block to block.
 
k.

Josh Trutwin <josh at trutwins.homeip.net> wrote:
On Fri, 9 Jul 2004 18:31:18 -0700 (PDT)
Kris Efland wrote:



> my question is, is there a way to modify the sql.php so that the
> select statements are using a tolower command or similar so that all
> queries coming into sql are lowercase?

Find the MySQL query and use something like:

SELECT whatever FROM auth_table
WHERE LOWER('$username_from_login_page') = LOWER(mysql_username_field);

This is a complete random guess at the actual SELECT query, but it should do the job if you can locate it.

Josh
-- 
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: imp-unsubscribe at lists.horde.org


		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!


More information about the imp mailing list