Uploaded image for project: 'Turbine'
  1. Turbine
  2. TRB-43

URL info path does decode correctly UTF-8 caracters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • Core 2.3.3
    • Core
    • None

    Description

      the DefaultParameterParser does not decode UTF-8 caracters correctly

      For instance when path info is the following: /screen/Download/webfile/Report%C3%A9%C3%A7%C3%A8%C3%A9%27.txt

      I got => org.apache.turbine.util.parser.DefaultParameterParser - Key: webfile -> Reportéçèé'.txt

      instead of => /screen/Download/webfile/Reportéçèé'.txt

      given by the followed piece of code: URLDecoder.decode( data.getRequest().getRequestURI(),"UTF-8")

      I think that we just need to replace in DefaultParameterParser in method setRequest(HttpServletRequest request)

      +paramName = URLDecoder.decode(st.nextToken(),"UTF-8"); // UTF-8 is recommended by W3C what ever the application encoding. it should not depend on input.encoding parameter
      -paramName = URLDecoder.decode(st.nextToken()); // this is depreciated

      Attachments

        Activity

          People

            tv Thomas Vandahl
            thomas.ung Thomas Ung
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: