Uploaded image for project: 'Barebones Tomcat Bundle'
  1. Barebones Tomcat Bundle
  2. MGNLTOMCAT-6

Tomcat 9 less tolerant on special characters (compared to Tomcat 8)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.3, 1.1.2
    • 1.0.1, 1.1.1
    • None
    • Yes
    • Saigon 151
    • 2

    Description

      Summary
      With Tomcat 9 (9.0.8 on barebone-1.1) - certain characters in an URI lead to an error; the same characters were accepted on our Tomcat-8 on barebone-1.0.
      We should aim to allow the same characters as we did on Tomcat-8.

      Error on Tomcat 9.0.8

      java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

      (See gist for the complete stack trace)
      This did not happen with the barebone-1.0.

      Example

      curl -g -G "<protocol>//<host>/<context>/.rest/delivery/pagesWithComponents/v1" --data-urlencode "title[like]=%Company%" -u superuser:superuser

      Tomcat 9, the way we have configured it, fails on the chars [ ] but accepts |.
      Tomcat 8 accepted both pipe and square brackets.

      Further reading

       

      Possible solution

      Set relaxedQueryChars property on Connector.
      Example:

      <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"
      relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
      redirectPort="8443" />
      

       See

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                hieu.nguyen Hieu Nguyen Duc
                cmeier Christoph Meier
                Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - 1.5d Original Estimate - 1.5d
                      1.5d
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 2.25d
                      2.25d