Template parameter to select tool installation or credentials is empty

Issue

You created a Job template with a parameter to select a tool installation or credentials but when you instantiate the job from the template the list of tools or credentials is abnormally empty (This problem occurs only if you are located in a folder).

In your browser script console you can see a 400 error like here:

encoded_slash.png

Environment

Resolution

The problem occurs only on Apache Tomcat.
To fix the issue, you need to define a system property org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH with the value true.
This is documented in prerequisites to deploy Jenkins on Apache Tomcat. See also Installing Operations Center - Running in Apache Tomcat and Installing Client Masters - Running in Apache Tomcat.

Note: Since Apache Tomcat 8.5.54 the system property org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH is deprecated and replaced by the Connector attribute encodedSolidusHandling.

On Linux

In ${CATALINA_HOME}/bin/setenv.sh add the line

CATALINA_OPTS='-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true'

On Windows

In ${CATALINA_HOME}\bin\setenv.bat add the line

set CATALINA_OPTS='-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true'

Have more questions?

0 Comments

Please sign in to leave a comment.