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.:
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.
Attachments
Attachments
Issue Links
- is related to
-
WICKET-5712 SecuritySettings.setEnforceMounts() does not work when the mounted mapper is not in the root compound mapper
- Resolved