开发者

problem in using ESAPI library for XSS prevention

开发者 https://www.devze.com 2023-02-03 12:55 出处:网络
I am trying to prevent XSS attacks in my website for this i am using OWASP ESAPI library .I added jar for thislibrary in classpath and I am getting following error .

I am trying to prevent XSS attacks in my website for this i am using OWASP ESAPI library .I added jar for this library in classpath and I am getting following error .

Attempting to load ESAPI.properties via file io.

Attempting to load ESAPI.properties via file io.

Not found i开发者_StackOverflow社区n '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.

Thanks


Like the error suggests, you are missing ESAPI.properties. It needs to be in your classpath. After you deploy, make sure you can find it in WEB-INF/classes.

Here is an example of ESAPI.properties.


Try adding ESAPI.properties and antisamy-esapi.xml to your "your web app"/src/java directory. When you build, it will be added to your classpath at "your web app"/build/web/WEB-INF/classes

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号