Wicket
  1. Wicket
  2. WICKET-4338

POST params ignored by IPageParametersEncoder#decodePageParameters()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.5.5
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      JDK 1.6.0_29, Mac OSX

      Description

      As per this conversation: http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-td4295139.html

      it seems that POST params are not properly processed and made available as PageParameters. Can anyone say whether this is intended behavior or not? I will attach a Quickstart to demonstrate.

      Martin's proposed fix is straightforward, but I am not comfortable enough with Wicket internals to say whether or not this would break something.

      Thanks

        Issue Links

          Activity

          Hide
          George Armhold added a comment -

          Quickstart to demonstrate that POST params are ignored.

          Show
          George Armhold added a comment - Quickstart to demonstrate that POST params are ignored.
          Hide
          Lucas Moten added a comment -

          The fix for this appears to break another scenario, which I don't believe is being tested. Specifically, that where 2 (or more) parameters are being set with the same name and value.
          For example: page?s=1&s=2&s=1 will end up yeilding page?s=1&s=2

          PageParameters.decodePageParameters was altered to call requestParameters.getParameterValues(paramName)
          CombinedRequestParametersAdapter.getParameterValues(final String name) explicitly filters out adding a value if it is already contained within the list.
          Since that logic was in place before this patch, I don't have much to go on to determine why the duplicate values are filtered out and what would possibly break if this code was modified to just add the values regardless of them being in the result already

          Show
          Lucas Moten added a comment - The fix for this appears to break another scenario, which I don't believe is being tested. Specifically, that where 2 (or more) parameters are being set with the same name and value. For example: page?s=1&s=2&s=1 will end up yeilding page?s=1&s=2 PageParameters.decodePageParameters was altered to call requestParameters.getParameterValues(paramName) CombinedRequestParametersAdapter.getParameterValues(final String name) explicitly filters out adding a value if it is already contained within the list. Since that logic was in place before this patch, I don't have much to go on to determine why the duplicate values are filtered out and what would possibly break if this code was modified to just add the values regardless of them being in the result already
          Hide
          Martin Grigorov added a comment -

          Fixed in WICKET-4417.
          Thanks Lucas!

          Show
          Martin Grigorov added a comment - Fixed in WICKET-4417 . Thanks Lucas!
          Hide
          Sven Meier added a comment -

          post paramters in page parameters may lead to wrongly encoded page urls (WICKET-4400)

          Show
          Sven Meier added a comment - post paramters in page parameters may lead to wrongly encoded page urls ( WICKET-4400 )
          Hide
          Sven Meier added a comment -

          This change is reverted, because transferring POST parameters into page parameters leads to all sort of problems when the POST parameters leak into generated urls.

          Show
          Sven Meier added a comment - This change is reverted, because transferring POST parameters into page parameters leads to all sort of problems when the POST parameters leak into generated urls.

            People

            • Assignee:
              Sven Meier
              Reporter:
              George Armhold
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development