At 02:27 PM 20/12/00, you wrote:
>Hi all,
>
>One thing I noticed about using Mysql for Auth is that by default it's 
>case insensitive and ignores trailing spaces, so users were getting in 
>with the following usernames
>"usernames" (as they should :)
>"usernames "
>"UserNames "
>
>So to fix this I found the following from the Mysql lists
>AuthSelect select ENCRYPTEDPASSWORD from SUBSCRIBERS where USERNAME REGEXP 
>'^%n$';
>
>It's doing what I want from the few tests I've done.
>
>Does anyone know of a better way to do this or are there any gotchas with 
>this method?
>
>Ta
The one thing I can think of is if you want to port your database system 
from MySQL to something else, like Informix, which does not support the 
REGEXP operator.  Informix is case sensitive, so it will not match the last 
example you gave, but it will return a result with trailing spaces (at 
least on varchar fields anyway), returning a result for the second example.

I'm not sure about Oracle, or MS-SQL server, as I've never used 
them.  Anyone care to throw something in about how these two handle these 
situations?
-- 
Joel Michael
Systems Administrator
Diggy Internet Services

(opinions are mine, not my employer's)


===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to