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

A 404 error occurs when using a CryptoMapper

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.14.0, 7.0.0-M1
    • Fix Version/s: 6.16.0, 7.0.0-M2
    • Component/s: wicket
    • Labels:
      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.zip
          23 kB
          Dirk Reichelt
        2. wicket5560.patch
          9 kB
          Andrea Del Bene

          Issue Links

            Activity

              People

              • Assignee:
                papegaaij Emond Papegaaij
                Reporter:
                dirk.reichelt Dirk Reichelt
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: