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 16:11:16 UTC

[jira] [Updated] (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 ]

Dirk Reichelt updated WICKET-5560:
----------------------------------

    Description: 
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.


  was:
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.


        Summary: A 404 error occurs when using a CryptoMapper  (was: A 404 error occurs when using a CryptoManager)

> 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.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)