Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-57662

"Go to included page" option in Excerpt Include macro is not possible when page contains square bracket

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 6.13.0
    • Core - Macros Platform
    • None

      Atlassian Update - 22nd July 2019

      We've discovered that this issue is a symptom of a bug at CONFSERVER-57582. Please watch that issue for further updates, and more detailed background and workarounds.

      Bug Summary:

      "Go to included page" option in Excerpt Include macro is not possible when page contains square brackets

      Environment:

      Confluence 6.13.0, postgres9.5 google chrome

      Steps to replicate
      • Create page A which contains square brackets in the page  title for example: "Page with [square] brackets"
      • Create page B.
      • Add Excerpt Include macro and point it to the page A
      • Save the Page B
      • Access edit mode for page "B"
      • Click on Excerpt macro and  then navigate to "Go to Included Page" button
      Expected results
      • Page A "Page with [square] brackets" will be opened
      Actual results

      Following error is returned:

      HTTP Status 400 – Bad Request
      Type Exception Report

      Message Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

      Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

      Exception

      java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
      org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467)
      org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
      org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
      org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
      org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      java.lang.Thread.run(Thread.java:748)
      Note The full stack trace of the root cause is available in the server logs.

      Workaround

      1. Go to <confluence_install>/conf, and edit the server.xml file.
      2. Find all connectors your application is using. Just search for Connector in the file, or look at the example below. You're interested only in connectors whose protocol is set to HTTP and HTTPS (not AJP).
      3. Add relaxedQueryChars="[,]" to the connector properties in server.xml. For example:
                <Connector port="26156" connectionTimeout="20000" redirectPort="8443"
                           maxThreads="48" minSpareThreads="10"
                           enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                           relaxedQueryChars="[,]"
                           protocol="org.apache.coyote.http11.Http11NioProtocol"/>
        
      1. Restart Confluence

              Unassigned Unassigned
              gkowalczyk GMK
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: