Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira + Tomcat7: "Invalid character found in the request target" on issue transition

Administradores_SGO
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2019

Hello!

We have recently upgraded a little JIRA Test instance to work with a different Tomcat version than we were using before. It's a JIRA WAR, version 6.3.13, running with Tomcat 7.0.68.0, Java 1.8.0_161, on an Ubuntu 16.04 machine. It is reached via an Apache Proxy, redirecting port 443 to port 8080. Since we upgraded the Tomcat, we've been experiencing a 400 Bad Request along with this error on catalina.out whenever any user tries to execute any issue transition:

Jul 18, 2019 6:08:03 PM org.apache.coyote.http11.AbstractHttp11Processor process
INFO: Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:189)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:992)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

 

We've tried all the workarounds that we could find, adding:


tomcat.util.http.parser.HttpParser.requestTargetAllow={|}
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

to catalina.properties, and:

relaxedPathChars="[]|"
relaxedQueryChars="[]|{}^\`"<>"

to server.xml, but none of it made any difference, and the same error persists. Is there any other approach that we could follow?

 

Edit: after a few more testing, we figured out that the error is indeed caused by a pipe (|) character in the URL, specifically in the atl_token value. Apparently, it's been fixed in more recent versions of Jira, as stated here: https://jira.atlassian.com/browse/JRASERVER-33520, but there should be some kind of workaround for older versions as well, and none of the previously mentioned are working...

0 answers

Suggest an answer

Log in or Sign up to answer