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/04/27 19:29:14 UTC

[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=13982399#comment-13982399 ] 

Andrea Del Bene edited comment on WICKET-5560 at 4/27/14 5:27 PM:
------------------------------------------------------------------

A possible solution could be using method checkPageClass of AbstractBookmarkableMapper to see if the page class is mounted. See patch (for branch master!).


was (Author: bitstorm):
A possible solution could be using method checkPageClass of AbstractBookmarkableMapperto see if the page class is mounted. See patch (for branch master!).

> 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
>            Reporter: Dirk Reichelt
>            Assignee: Emond Papegaaij
>         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)