Skip to content

Commit c51c5b2

Browse files
committed
relaxedPath options only needed from Jira version >v7.12.1 and Service Desk
According to https://confluence.atlassian.com/jirakb/changing-server-xml-to-handle-requests-with-special-characters-958453799.html we need to have relaxedPathChars and relaxedQueryChars set according to the FAQ page of Atlassian with Jira version greater than 7.12.1 and apparently Service Desk.
1 parent d902286 commit c51c5b2

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

templates/server.xml.erb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
<%- if @tomcat_address -%>
5050
address="<%= @tomcat_address %>"
5151
<%- end -%>
52+
<%- if ( scope.function_versioncmp([@version, '7.12.1']) > 0 && @product =~ /^jira/ ) or @product =~ /^servicedesk/ -%>
53+
relaxedPathChars="[]|"
54+
relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
55+
<%- end -%>
5256
maxThreads="<%= @tomcat_max_threads %>"
5357
minSpareThreads="<%= @tomcat_min_spare_threads %>"
5458
connectionTimeout="<%= @tomcat_connection_timeout %>"
@@ -58,8 +62,6 @@
5862
useBodyEncodingForURI="<%= @tomcat_use_body_encoding_for_uri %>"
5963
acceptCount="<%= @tomcat_accept_count %>"
6064
disableUploadTimeout="<%= @tomcat_disable_upload_timeout %>"
61-
relaxedPathChars="[]|"
62-
relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
6365
<% if @tomcat_native_ssl && @tomcat_redirect_https_port -%>
6466
redirectPort="<%= @tomcat_redirect_https_port %>"
6567
<% else -%>
@@ -79,15 +81,17 @@
7981
<%- if @tomcat_address -%>
8082
address="<%= @tomcat_address %>"
8183
<%- end -%>
84+
<%- if ( scope.function_versioncmp([@version, '7.12.1']) > 0 && @product =~ /^jira/ ) or @product =~ /^servicedesk/ -%>
85+
relaxedPathChars="[]|"
86+
relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
87+
<%- end -%>
8288
maxHttpHeaderSize="<%= @tomcat_max_http_header_size %>"
8389
SSLEnabled="true"
8490
maxThreads="<%= @tomcat_max_threads %>"
8591
minSpareThreads="<%= @tomcat_min_spare_threads %>"
8692
enableLookups="<%= @tomcat_enable_lookups %>"
8793
disableUploadTimeout="<%= @tomcat_disable_upload_timeout %>"
8894
acceptCount="<%= @tomcat_accept_count %>"
89-
relaxedPathChars="[]|"
90-
relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
9195
<% if ! @proxy['scheme'] -%>
9296
scheme="https"
9397
<% end -%>

0 commit comments

Comments
 (0)