On Oct 25, 2011, at 11:57 AM, Pawel Jasinski <pawel.j...@gmail.com> wrote:
> hi,
>
>> of directory traversal attacks (~ specifically).
> how exactly?
>
> I am talking about arguments and only arguments.
> I agree that ~ in case of application/controller/method makes no sense
> In case of static agree 100%, but that is different control path.
If you enable the parametric router, you'll get the kind of args handling you want, with the added feature that you can rewrite the args validation regex.
> hi,
>
> thanks! That solved my ~ problem.
>
> Unfortunately for my öäü (chars above 128 and below 255 in latin-1) I
> still need to overcome 2 challenges:
>
> 1. re.U must be supplied to compile or match to take advantage of
> unicode interpretation of \w.
> I could shift compile into the routes.py. Is it acceptable?
I think so, yes.
>
> 2. at some point before match call args have to be subjected to
> decode('utf-8') to become unicode
> Any suggestions?
I'd like to do this right, but I'm a little confused. Do we need to consider Punycode, for example? Or is that just for domain names?
> On Oct 26, 5:25 am, Jonathan Lundell <jlund...@pobox.com> wrote:
>> On Oct 25, 2011, at 2:06 PM, Pawel Jasinski wrote:
>>
>>> hi,
>>
>>> thanks! That solved my ~ problem.
>>
>>> Unfortunately for my öäü (chars above 128 and below 255 in latin-1) I
>>> still need to overcome 2 challenges:
>>
>>> 1. re.U must be supplied to compile or match to take advantage of
>>> unicode interpretation of \w.
>>> I could shift compile into the routes.py. Is it acceptable?
>>
>> I think so, yes.
>>
>>
>>
>>> 2. at some point before match call args have to be subjected to
>>> decode('utf-8') to become unicode
>>> Any suggestions?
>>
>> I'd like to do this right, but I'm a little confused. Do we need to consider Punycode, for example? Or is that just for domain names?
>>
>
> what I mean is very trivial:
Thanks.
I'm a little concerned, for compatibility reasons, about making an unconditional change. I'm thinking I'll put an enable flag into the routing parameters and then implement both changes you suggest (vars, too), conditional on that flag.
I'm traveling now and am not likely to get to it for about a week, though.