You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Dirk Reichelt (JIRA)" <ji...@apache.org> on 2014/04/17 14:02:15 UTC

[jira] [Commented] (WICKET-5560) A 404 error occurs when using a CryptoManager

    [ https://issues.apache.org/jira/browse/WICKET-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13972860#comment-13972860 ] 

Dirk Reichelt commented on WICKET-5560:
---------------------------------------

Attachment wicket5560.zip contains a quickstart app showing the bug.
(click on "Click here" in the HomePage to trigger the 404 error)
TestHomePage contains a test that fails due to the bug.

> A 404 error occurs when using a CryptoManager
> ---------------------------------------------
>
>                 Key: WICKET-5560
>                 URL: https://issues.apache.org/jira/browse/WICKET-5560
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.14.0
>            Reporter: Dirk Reichelt
>            Assignee: Emond Papegaaij
>         Attachments: wicket5560.zip
>
>
> Under certain prerequisites a 404 error occurs.
> The prerequisites are:
> - A CryptoMapper is used as RequestMapper
> - SecuritySettings.enforceMounts is set to true
> - Class SomePage is *not* annotated with @MountPath
> Reason:
> In _BookmarkableMapper.parseRequest_ (called indirectly by _CryptoMapper.mapRequest_) the method _matches_ returns _false_,
> as _reverseUrl_ is the *encrypted URL* (_rootRequestMapper_ is a _CryptoMapper_) but _BookmarkableMapper.matches_ expects a *decrypted URL*.
> _BookmarkableMapper_ - lines 132 ff.:
> {code}
> Url reverseUrl = application.getRootRequestMapper().mapHandler(
> 	new RenderPageRequestHandler(new PageProvider(pageClass)));
> if (!matches(request.cloneWithUrl(reverseUrl)))
> {
> 	return null;
> }
> {code}
> 	
> As a result _BookmarkableMapper.mapRequest_ and hence _CryptoMapper.mapRequest_ returns _null_ resulting in a 404 error.



--
This message was sent by Atlassian JIRA
(v6.2#6252)