Uploaded image for project: 'Click'
  1. Click
  2. CLK-312

request.setCharacterEncoding is called after request parameters are read

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • core
    • None
    • Click 1.4RC3

    Description

      Ricardo identified a problem in ClickServlet where request.setCharacterEncoding is called after ClickRequestWrapper is created which can potentially read request parameters in the case of a file upload.

      According to the Servlet javadoc ServletRequest#setCharacterEncoding states:

      This method must be called prior to reading request parameters or reading input using getReader().

      To fix we can move the request.setCharacterEncoding code before we create a new Context.

      Kudos to Ricardo for identifying and providing a fix for this issue!

      Attachments

        Activity

          People

            sabob Bob Schellink
            sabob Bob Schellink
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: