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

POST params ignored by IPageParametersEncoder#decodePageParameters()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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
          armhold@cs.rutgers.edu George Armhold added a comment -

          Quickstart to demonstrate that POST params are ignored.

          Show
          armhold@cs.rutgers.edu George Armhold added a comment - Quickstart to demonstrate that POST params are ignored.
          Hide
          kreveksa 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
          kreveksa 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
          mgrigorov Martin Grigorov added a comment -

          Fixed in WICKET-4417.
          Thanks Lucas!

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

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

          Show
          svenmeier Sven Meier added a comment - post paramters in page parameters may lead to wrongly encoded page urls ( WICKET-4400 )
          Hide
          svenmeier 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
          svenmeier 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:
              svenmeier Sven Meier
              Reporter:
              armhold@cs.rutgers.edu George Armhold
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development