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/16 18:34:15 UTC
[jira] [Created] (WICKET-5560) Click on any link leads to a 404
error
Dirk Reichelt created WICKET-5560:
-------------------------------------
Summary: Click on any link leads to a 404 error
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
Under certain prerequisites a click on any link in an instance of SomePage leads to a 404 error.
The prerequisites are:
- Class SomePage is not annotated with @MountPath
- SecuritySettings.enforceMounts is set to true
- A CryptoMapper is used as RequestMapper
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.:
Url reverseUrl = application.getRootRequestMapper().mapHandler(
new RenderPageRequestHandler(new PageProvider(pageClass)));
if (!matches(request.cloneWithUrl(reverseUrl)))
{
return null;
}
As a result BookmarkableMapper.mapRequest and hence CryptoMapper.mapRequest returns null resulting in a 404 error.
The Problem came up with the change in the if-clause in Component.urlFor(Behavior, RequestListenerInterface, PageParameters) [lines 3341 ff.].
Now BookmarkableListenerInterfaceRequestHandler is used instead of ListenerInterfaceRequestHandler.
(Page isBookmarkable and wasCreatedBookmarkable, but is not stateless.)
So BookmarkableMapper became responsible.
--
This message was sent by Atlassian JIRA
(v6.2#6252)