Obviously, you can also use it the other way around:
RewriteUsername s/[^A-Za-z0-9\.\-_&]//g
which will cause the rewrite to filter all "bad" characters, instead of
stopping after it found a bad one...
-Andy
--
......................................................................
: :
: Andy De Petter <[EMAIL PROTECTED]> :
: Skynet NV/SA System Engineer :
: :
: Kol. Bourgstraat 124 _,'| _.-''``-...___..--'; :
: 1140 Brussels /, \'. _..-' , ,--...--''' :
: < \ .`--''' ` /| :
: Tel +32 (0)2 7061311 `-,;' ; ; ; :
: Fax +32 (0)2 7061312 __...--'' __...--_..' .;.' :
: (,__....----''' (,..--'' :
: http://www.skynet.be :
......................................................................
The opinions expressed are personal.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Andy De Petter
> Sent: woensdag 20 december 2000 8:00
> To: Raymond Brighenti; [EMAIL PROTECTED]
> Subject: RE: (RADIATOR) Feedback - MySQL and Case sensitivity
>
>
>
> 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.
>
===
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.