Browse Source

Pull request #2230: REPORT-38889 tomcat 8.5.x 请求参数带特殊字符问题

Merge in DESIGN/design from ~JEO/report-design:persist/10.0 to persist/10.0

* commit 'b2fa5c0f739a2f337e521c7333a48eb882d3b4db':
  REPORT-38889 tomcat 8.5.x 请求参数带特殊字符问题
persist/10.0
Kara 4 years ago
parent
commit
f29a62528b
  1. 4
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

4
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -62,6 +62,10 @@ public class FineEmbedServerActivator extends Activator {
tomcat.setPort(DesignerEnvManager.getEnvManager().getEmbedServerPort()); tomcat.setPort(DesignerEnvManager.getEnvManager().getEmbedServerPort());
// 设置解码uri使用的字符编码 // 设置解码uri使用的字符编码
tomcat.getConnector().setURIEncoding(EncodeConstants.ENCODING_UTF_8); tomcat.getConnector().setURIEncoding(EncodeConstants.ENCODING_UTF_8);
// 参考 https://jira.atlassian.com/browse/CONFSERVER-57582
// https://tomcat.apache.org/tomcat-8.5-doc/config/http.html
// 8.5.x 请求参数带特殊字符被tomcat拒绝 []|{}^\`"<>
tomcat.getConnector().setProperty("relaxedQueryChars", "[]|{}^&#x5c;&#x60;&quot;&lt;&gt;");
setMaxPostSize(); setMaxPostSize();
String docBase = new File(WorkContext.getCurrent().getPath()).getParent(); String docBase = new File(WorkContext.getCurrent().getPath()).getParent();

Loading…
Cancel
Save