You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (JIRA)" <ji...@apache.org> on 2014/05/05 19:38:17 UTC

[jira] [Closed] (WICKET-5560) A 404 error occurs when using a CryptoMapper

     [ https://issues.apache.org/jira/browse/WICKET-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Del Bene closed WICKET-5560.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 7.0.0-M2
                   6.16.0

> A 404 error occurs when using a CryptoMapper
> --------------------------------------------
>
>                 Key: WICKET-5560
>                 URL: https://issues.apache.org/jira/browse/WICKET-5560
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.14.0, 7.0.0-M1
>            Reporter: Dirk Reichelt
>            Assignee: Emond Papegaaij
>             Fix For: 6.16.0, 7.0.0-M2
>
>         Attachments: wicket5560.patch, 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)