security - 使用ESAPI库预防XSS的问题

标签 security xss owasp

我正在尝试防止我的网站中的 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 中找到它。

这是一个example of ESAPI.properties .

关于security - 使用ESAPI库预防XSS的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4662202/

相关文章:

Javascript Vue 或 React 存储敏感信息客户端安全

php - 内容数据库 - 可以存储 HTML 吗?

.net - 使用 Kerberos 对网站和 Web 服务进行身份验证是个好主意吗?

xss - 防止特定 JSP 和 Servlet 代码上的跨站点脚本编写

coldfusion - esapi:对于 src 属性,我们应该使用 encodeForHTMLAttribute 吗?编码ForURL?或两者?

javascript - 哪个 XSS OWASP 规则

java - Spring Data Rest 仅使用父路径

sql - 捕获 SQL 注入(inject)和其他恶意 Web 请求

owasp - ZAP 不断扫描不必要的 URL

java - OWASP java-html-sanitizer - 未封闭标签的策略