Coding forward and backward slashes in tomcat 7?

后端 未结 4 1075
孤城傲影
孤城傲影 2021-02-05 11:24

I try send request like http://site.com/abc%2Fabc and it doesn\'t work (send status 400). How I understand tomcat doesn\'t accept encoded path separators for security reasons, b

4条回答
  •  星月不相逢
    2021-02-05 12:22

    There is a Tomcat option to allow encoded path separators.

    Set the CATALINA_OPTS env var to

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

    This will allow encoded slashes.

提交回复
热议问题