coverity / coverity-security-library

Coverity Security Library (CSL) is a lightweight set of escaping routines for fixing cross-site scripting (XSS), SQL injection, and other security defects in Java web applications.
http://security.coverity.com/document/2013/Mar/fixing-xss-a-practical-guide-for-developers.html
200 stars 38 forks source link

Add % to the JS string escaper #1

Closed neuroo closed 11 years ago

neuroo commented 11 years ago

The current implementation does not JS string escape '%' and this can cause issues when the wrong sequence of escapers are used in a javascript: URI. The recommendation is to JS string escape -> URI encode -> HTML escape, but when adding % to JS string escape, we can factor out the URI encoder.