afair the strategy is meant to preserve bookmarkable url because those
are your entrypoints and are not meant to be encoded.

if you mount your login page with querystringurlcodingstrategy instead
of the default then the url
"login/wicket:interface/:2:componentId:loginForm::IFormSubmitListener::"
will be encoded with the normal query string and crypto will work.

-igor

On Mon, Mar 8, 2010 at 11:10 AM, Neil Curzon <[email protected]> wrote:
> Hi users!
>
> I've been testing out the CryptedUrlWebRequestCodingStrategy for our wicket
> app in 1.4.3 (yeah, soon to be upgraded..). We have two sites in Wicket. I
> changed them both to use said CryptedUrlWebRequestCodingStrategy, and I
> noticed that the login form post action only got encoded for one of them.
>
> I stepped through the code and noticed that the difference was that in one
> of our apps (1), the Login page was set as the Home Page, and the Index page
> was mounted at /home. In the other app (2), the Index page was set as the
> Home Page, and the Login page was mounted at /login. In encode() in
> CryptedUrlWebRequestCodingStrategy for (1), the call to encode() in the
> wrapped defaultStrategy returns
> ?wicket:bookmarkablePage=:com.acme.project.wicket.pages.section.FooLogin&wicket:interface=:1:loginForm::IFormSubmitListener::
> , and in (2) the call returns
> login/wicket:interface/:2:componentId:loginForm::IFormSubmitListener:: . The
> subsequent code then refuses to do any encoding unless there's a "?" in the
> URL, which for (2), there isn't.
>
> Is this behavior intentional / necessary? It feels kinda fragile, and I'd
> really rather not accidentally expose internals based on changing around
> some bookmarkable links, or slightly reorganizing the app. Or, is there some
> way to reliably force the URL for the (2) to have a "?" in it?
>
> Any help would be appreciated!
> Thanks,
> Neil
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to