界: Environment
本节包括的所有内容均与源代码无关,但对所创建产品的安全性仍然至关重要。因为本节涉及的问题与源代码没有直接关系,所以我们将它与其他章节分开。
Struts Misconfiguration: Invalid Path
Abstract
无效路径条目会阻止 Struts 定位正确的服务请求资源。
Explanation
Struts 使用
示例 1:以下配置包含空路径。
path
属性定位处理请求所需的资源。由于路径是指相对于模块的位置,如果不以“/”字符开头,则会导致错误。示例 1:以下配置包含空路径。
示例 2:以下配置使用的路径不以“/”字符开头。
<global-exceptions>
<exception key="global.error.invalidLogin" path="" scope="request" type="InvalidLoginException" />
</global-exceptions>
<global-forwards>
<forward name="login" path="Login.jsp" />
</global-forwards>
References
[1] Apache Struts Specification
[2] Chuck Caveness, Brian Keeton
[3] Standards Mapping - OWASP API 2023 API8 Security Misconfiguration
[4] Standards Mapping - OWASP Mobile 2014 M1 Weak Server Side Controls
[5] Standards Mapping - OWASP Top 10 2013 A5 Security Misconfiguration
[6] Standards Mapping - OWASP Top 10 2017 A6 Security Misconfiguration
[7] Standards Mapping - OWASP Top 10 2021 A05 Security Misconfiguration
desc.config.java.struts_misconfiguration_invalid_path