You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Francois Armand <fa...@linagora.com> on 2008/01/29 10:28:00 UTC

[T5] URL encoding maze : post to encoded URL (even in 5.0.9) ?

Hello,

I'm still stick with some encoding issue for URL using UTF-8.

I'm stick with Tapestry 5.0.6. I applied the patch for TAPESTRY- bug ( 
https://issues.apache.org/jira/secure/attachment/12371922/context_encode_decode_fix_to_5.0.6.patch), 
what solves a lot of problem.

But it's not over, and that part applies even to Tapestry 5.0.9 :

It seems that post are posted the the encoded URL. The following post is 
also done to the encoded URL, but that part is decoded by the servlet 
API call to getServletPath().

So, if (as it's in my case) you use onActivate(String name) in a page 
using a post, the "name" given to onActivate for the post action will 
receive a non decoded String. If some validation are done based on that 
encoded value, as a check in DB, they fail.

So, as I figure I'm not the only one to do this kind of things, and that 
I'm doing something bad. Please, would somebody show me my error ?

-- 
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/
Open Source identities management and federation


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] URL encoding maze : post to encoded URL (even in 5.0.9) ?

Posted by Francois Armand <fa...@linagora.com>.
Francois Armand wrote:
> So, if (as it's in my case) you use onActivate(String name) in a page 
> using a post, the "name" given to onActivate for the post action will 
> receive a non decoded String. If some validation are done based on 
> that encoded value, as a check in DB, they fail.
>
> So, as I figure I'm not the only one to do this kind of things, and 
> that I'm doing something bad. Please, would somebody show me my error ?

OK, it seems that the guilty was the TapestryInternalUtils.encodeContext 
on line 155 of LinkFactoryImpl#addActivationContextToLink : as soon as I 
removed it, everything start working.

I hope it does not break things elsewhere ^^


-- 
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/
Open Source identities management and federation


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org