【发布时间】:2021-09-27 00:52:00
【问题描述】:
在使用 1.5.8 版本的 Spring-boot Web 应用程序时,我面临目录遍历问题,仅在 .war 扩展包中。
项目结构。
app.war-->
->css
->images
->js
->META-INF
->org-
->springframework->boot->loader->jar->Bytes.class
->WEB-INF
in which directly able to access.
http://localhost:3737/app/org/springframework/boot/loader/jar/Bytes.class
If I used 2.x of spring-boot then the issue is not comming.
Spring-boot-->1.5.8.RELEASE
Spring-mvc-->4.3.25.RELEASE
Spring-Security-->security-web-4.2.8.RELEASE
Tomcat-->tomcat-embed-core-8.5.35.jar
同样,我正在尝试使用 Spring Boot 使用 web.xml 安全约束来防止访问。 Use web.xml security constraints with Spring Boot 但同样不工作
【问题讨论】:
-
欢迎来到 Stack Overflow。请改进问题的格式,使其更易于阅读。问题的描述不应该使用代码片段的降价。在此处查看更多信息:stackoverflow.com/editing-help
标签: java spring-boot spring-mvc spring-security tomcat8