Hello,
I'm performing a RewriteUsername in my Realm, just before doing the AuthBy:
RewriteUsername s/^([A-Za-z0-9\.\-_&]+).*/$1/
This will cause Radiator to rewrite a username like this:
When it finds a character it doesn't expect in the username, it will stop
there, and not process any characters that follow.
For example, if you enter "test " it will rewrite it to "test".
If you enter "t:e:s:t" it will rewrite it to "T".
You can add exceptions to the regexp, if you want, but I don't think you
should use any other charachters in usernames, than the ones I'm excepting
right now.
If you also want everything to be lower case, you can add:
RewriteUsername tr/[A-Z]/[a-z]/
which should work, but I haven't tested that one out.
Hope that helps,
-Andy
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Raymond Brighenti
> Sent: woensdag 20 december 2000 5:28
> To: [EMAIL PROTECTED]
> Subject: (RADIATOR) Feedback - MySQL and Case sensitivity
>
>
> 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
>
> Ray
>
>
> ===
> 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.
>
===
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.