Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5560

A 404 error occurs when using a CryptoMapper

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.14.0, 7.0.0-M1
    • 6.16.0, 7.0.0-M2
    • wicket
    • None

    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

        1. wicket5560.patch
          9 kB
          Andrea Del Bene
        2. wicket5560.zip
          23 kB
          Dirk Reichelt

        Issue Links

          Activity

            People

              papegaaij Emond Papegaaij
              dirk.reichelt Dirk Reichelt
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: