Wicket
  1. Wicket
  2. WICKET-4865

Page parameters not working with CryptoMapper

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2.0
    • Fix Version/s: 6.3.0
    • Component/s: wicket
    • Labels:
      None

      Description

      When CryptoMapper is used, page parameters do not work. This is because the incorrect request is set in the request cycle. The incorrect request contains the encrypted url, where the page parameters are encoded into the url segments. When the CryptoMapper maps a url to a request handler, it should set the request to the correct request when the request handler is selected.

      This was reported on the users@ list, but I have also fallen victim to it when getting urlFor(resourceReference, pageParameters) and the pageParameters not comming out on the other end.

      See:
      http://mail-archives.apache.org/mod_mbox/wicket-users/201211.mbox/%3C50991F74.3050605@unknown.za.net%3E
      https://github.com/jesselong/wicket/commits/for-apache-master-pr-4 (3 commits)

        Issue Links

          Activity

          Hide
          Martin Grigorov added a comment -

          Please provide a patch as attachment and this can be fixed for 6.3.0 (planned for Nov 16).

          Show
          Martin Grigorov added a comment - Please provide a patch as attachment and this can be fixed for 6.3.0 (planned for Nov 16).
          Hide
          Jesse Long added a comment -

          WICKET-4865.patch - patch as requested.

          Show
          Jesse Long added a comment - WICKET-4865 .patch - patch as requested.
          Hide
          Sven Meier added a comment -

          I don't understand the problem, Page parameters work fine here:
          They are correctly decoded by CryptoMapper and then passed as #request.cloneWithUrl(url) to e.g. BookmarkableMapper.

          Show
          Sven Meier added a comment - I don't understand the problem, Page parameters work fine here: They are correctly decoded by CryptoMapper and then passed as #request.cloneWithUrl(url) to e.g. BookmarkableMapper.
          Hide
          Martin Grigorov added a comment -

          The patch is applied with minor improvements. Please test it today if you can.
          Additionally I see there is no test for the described issue in the mailing list. It would be good to have one to prevent any regressions in the future.

          Thanks!

          Show
          Martin Grigorov added a comment - The patch is applied with minor improvements. Please test it today if you can. Additionally I see there is no test for the described issue in the mailing list. It would be good to have one to prevent any regressions in the future. Thanks!
          Hide
          Jesse Long added a comment -

          @Sven - It works for request handlers that are passed the page parameters in the constructor. The API of request handler does not require this, it should be able to work with the request cycle provided. Without the patch, the request cycle provided to request handler is invalid.

          @Martin - yes, your patch looks better than mine. Thank you. (There really should be a wicket 7 branch so we can start implementing new features and remove deprecated stuff on it in the mean time).

          I will test shortly.

          Show
          Jesse Long added a comment - @Sven - It works for request handlers that are passed the page parameters in the constructor. The API of request handler does not require this, it should be able to work with the request cycle provided. Without the patch, the request cycle provided to request handler is invalid. @Martin - yes, your patch looks better than mine. Thank you. (There really should be a wicket 7 branch so we can start implementing new features and remove deprecated stuff on it in the mean time). I will test shortly.
          Hide
          Martin Grigorov added a comment -

          Jesse Longcan you please take a look at WICKET-5326 ? Thanks!

          Show
          Martin Grigorov added a comment - Jesse Long can you please take a look at WICKET-5326 ? Thanks!

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Jesse Long
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development