On 02/16/06 Edward C. Eisenbrey wrote:
> You're right, that seems to work just as well.  The updated patch file
> is attached.
[...]
> From: Eyal Alaluf [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 16, 2006 4:29 AM
> To: Edward C. Eisenbrey
> Cc: mono-devel-list@lists.ximian.com
> Subject: Re: [Mono-dev] [PATCH] MS/Mono incompatibility in
> System.Web.HttpRequest
> 
> Hi, Edward.
> 
> Is it not enough to use: "<[a-zA-Z\\!]" as the RegEx instead of
> "<[a-zA-Z\\!]+"?
> It works much faster (since RegEx tries always for the biggest match
> possible) and it
> does exactly the same thing.

Doing the check without regular expressions would be even faster
(and the choice here).
But first, someone will have to explain what are we checking against
here. If MS does fewer checks it might just mean that they have a less
secure implementation.
Also, the method should be renamed: CheckString() doesn't tell us if
it's checking for a valid string or for an invalid one. This one
should likely be named IsInvalidString or IsUnsafeString etc.

lupus

-- 
-----------------------------------------------------------------
[EMAIL PROTECTED]                                     debian/rules
[EMAIL PROTECTED]                             Monkeys do it better
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to