我正在尝试防止我的网站中的 XSS 攻击,为此我正在使用 OWASP ESAPI 库。我在类路径中为此库添加了 jar,但出现以下错误。
Attempting to load ESAPI.properties via file io.
Attempting to load ESAPI.properties via file io.
Not found in 'org.owasp.esapi.resources' directory or file not readable: F:\eclipse\ESAPI.properties
Not found in SystemResource Directory/resourceDirectory: .esapi\ESAPI.properties
Not found in 'user.home' directory: C:\Users\juzer.esapi\ESAPI.properties
Loading ESAPI.properties via file io failed.
Attempting to load ESAPI.properties via the classpath.
ESAPI.properties could not be loaded by any means. fail.
谢谢
最佳答案
正如错误所示,您缺少 ESAPI.properties。它需要位于您的类路径中。部署后,确保您可以在 WEB-INF/classes 中找到它。
关于security - 使用ESAPI库预防XSS的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4662202/