You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Rakesh A <ia...@rediffmail.com> on 2016/09/14 09:00:25 UTC

CryptoMapper, Mounted pages recreation and ModalWindow cookie

Hi,

When we've a mounted page for URL '/my-page' and modal window (with
'cookieName' set) is opened from that page modal window size/position
information is set into a cookie and path set for it contains the mount path
as well.

When we enable CryptoMapper in WicketApplication, encrypted URLs for Ajax
links/behaviors will look like '/<context>/my-page?wicket-crypt=...', and
modal window size/position cookie is also sent along with any Ajax call made
(including modal window close ajax call).

On top this if we set
'org.apache.wicket.settings.def.PageSettings.recreateMountedPagesAfterExpiry'
to 'false' by calling 

getPageSettings().setRecreateMountedPagesAfterExpiry(false);

in WicketApplication#init() function, encrypted URLs for Ajax
links/behaviors will look like '/<context>/<encrypted>', and modal window
size/position cookie is NOT sent along with Ajax calls.

This is because the 'path' for the cookie contains page mount path, but the
encrypted ajax URLs doesn't contain the page mount path.

Different seems to be in
"org.apache.wicket.Component.createRequestHandler(RequestListenerInterface,
PageParameters, Integer)"; where for the first scenario
'BookmarkableListenerInterfaceRequestHandler' instance is being created, and
for the second scenario 'ListenerInterfaceRequestHandler' instance is being
created.

Is it a bug ?
How do I solve it in the second scenario mentioned above ?

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: CryptoMapper, Mounted pages recreation and ModalWindow cookie

Posted by Rakesh A <ia...@rediffmail.com>.
Hi,

Added to my previous reproduction steps, there one more configuration which
causes the mentioned behavior;
When the mounted page has some url path parameter. It might also be
reproducible if mounted path more than one URL segments.

Please find the quick start attached. 
Try accessing the page using '<domain>:<port>/<context>/modal-ex/my-page/01'


modal-ex.7z
<http://apache-wicket.1842946.n4.nabble.com/file/n4675540/modal-ex.7z>  

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513p4675540.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: CryptoMapper, Mounted pages recreation and ModalWindow cookie

Posted by Rakesh A <ia...@rediffmail.com>.
Created an issue for it - https://issues.apache.org/jira/browse/WICKET-6248

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513p4675621.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: CryptoMapper, Mounted pages recreation and ModalWindow cookie

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

The cookie is set at
https://github.com/apache/wicket/blob/d4f0bba426cb4106576f35cc430392f81bd9e759/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js#L1667
but I don't see 'path' being set for it.
I am not sure but I'd guess in this case its default value should be '/'.

Please create a quickstart and we will investigate what happens!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Sep 14, 2016 at 11:00 AM, Rakesh A <ia...@rediffmail.com>
wrote:

> Hi,
>
> When we've a mounted page for URL '/my-page' and modal window (with
> 'cookieName' set) is opened from that page modal window size/position
> information is set into a cookie and path set for it contains the mount
> path
> as well.
>
> When we enable CryptoMapper in WicketApplication, encrypted URLs for Ajax
> links/behaviors will look like '/<context>/my-page?wicket-crypt=...', and
> modal window size/position cookie is also sent along with any Ajax call
> made
> (including modal window close ajax call).
>
> On top this if we set
> 'org.apache.wicket.settings.def.PageSettings.
> recreateMountedPagesAfterExpiry'
> to 'false' by calling
>
> getPageSettings().setRecreateMountedPagesAfterExpiry(false);
>
> in WicketApplication#init() function, encrypted URLs for Ajax
> links/behaviors will look like '/<context>/<encrypted>', and modal window
> size/position cookie is NOT sent along with Ajax calls.
>
> This is because the 'path' for the cookie contains page mount path, but the
> encrypted ajax URLs doesn't contain the page mount path.
>
> Different seems to be in
> "org.apache.wicket.Component.createRequestHandler(
> RequestListenerInterface,
> PageParameters, Integer)"; where for the first scenario
> 'BookmarkableListenerInterfaceRequestHandler' instance is being created,
> and
> for the second scenario 'ListenerInterfaceRequestHandler' instance is
> being
> created.
>
> Is it a bug ?
> How do I solve it in the second scenario mentioned above ?
>
> Regards,
> Rakesh.A
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-
> ModalWindow-cookie-tp4675513.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>