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

Incorrect decode parameters in AbstractRequestTargetUrlCodingStrategy#decodeParameters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7
    • Fix Version/s: 1.4.11
    • Component/s: wicket
    • Labels:
    • Environment:
      Java 1.5, Tomcat 5.5

      Description

      In case of utf-8 url (see example below) created ValueMap in AbstractRequestTargetUrlCodingStrategy#decodeParameters is incorrect.
      Each key-value pair contains not decoded key and decoded value.

      Proposed fix - line no 171 in AbstractRequestTargetUrlCodingStrategy#decodeParameters
      parameters.add(pairs[i], value);
      shall be
      parameters.add(urlDecodePathComponent(pairs[i]), value);

      Changes locally tested on 1.4.7 version - no failed test. But I am not sure is AbstractRequestTargetUrlCodingStrategy covered by test cases.
      And works correctly on tomcat.

      URL in browser

      http://jewelry.npa.com:8080/ws/shop/category/Браслеты/Колір_металу/Белый/Вставка/Бриллиант/Розмір/19.5/brand/Enigma/Проба/750/Матеріал/Золото/price/USD-31-60/Колір_вставки/Белый

      URL in Tomcat
      http://jewelry.npa.com:8080/ws/shop/category/%D0%91%D1%80%D0%B0%D1%81%D0%BB%D0%B5%D1%82%D1%8B/%D0%9A%D0%BE%D0%BB%D1%96%D1%80_%D0%BC%D0%B5%D1%82%D0%B0%D0%BB%D1%83/%D0%91%D0%B5%D0%BB%D1%8B%D0%B9/%D0%92%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0/%D0%91%D1%80%D0%B8%D0%BB%D0%BB%D0%B8%D0%B0%D0%BD%D1%82/%D0%A0%D0%BE%D0%B7%D0%BC%D1%96%D1%80/19.5/brand/Enigma/%D0%9F%D1%80%D0%BE%D0%B1%D0%B0/750/%D0%9C%D0%B0%D1%82%D0%B5%D1%80%D1%96%D0%B0%D0%BB/%D0%97%D0%BE%D0%BB%D0%BE%D1%82%D0%BE/price/USD-31-60/%D0%9A%D0%BE%D0%BB%D1%96%D1%80_%D0%B2%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B8/%D0%91%D0%B5%D0%BB%D1%8B%D0%B9

        Attachments

          Activity

            People

            • Assignee:
              ivaynberg Igor Vaynberg
              Reporter:
              azarny Igor Azarny
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified