problem in using ESAPI library for XSS prevention
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
精彩评论