This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

OWASP Java HTML Sanitizer Project

From OWASP
Revision as of 08:27, 5 February 2014 by Jmanico (talk | contribs)

Jump to: navigation, search
OWASP Project Header.jpg

OWASP JSON Sanitizer Project

Our Mission: Given JSON-like content, convert it to valid JSON! The OWASP JSON Sanitizer Project is a simple to use Java library that can be attached at either end of a data-pipeline to help satisfy Postel's principle: be conservative in what you do, be liberal in what you accept from others
Applied to JSON-like content from others, it will produce well-formed JSON that should satisfy any parser you use.
Applied to your output before you send, it will coerce minor mistakes in encoding and make it easier to embed your JSON in HTML and XML.

Security

Since the output of the OWASP JSON Sanitizer Project is always well-formed JSON, passing it to eval will have no side-effects and no free variables, so is neither a code-injection vector, nor a vector for exfiltration of secrets. This library only ensures that the JSON string → Javascript object phase has no side effects and resolves no free variables, and cannot control how other client side code later interprets the resulting Javascript object. So if client-side code takes a part of the parsed data that is controlled by an attacker and passes it back through a powerful interpreter like eval or innerHTML then that client-side code might suffer unintended side-effects.

Licensing

The OWASP Java Encoder is free to use under the Apache 2 License.

What is this?

The OWASP JSON Sanitizer Projects provides:

  • Java based JSON outbound or inbound sanitization library

Code Repo

OWASP JSON Sanitizer at Google Code

Email List

Project Email List

Project Leader

Project Leader:
Mike Samuel

Contributors:
Jim Manico

Related Projects

Quick Download

News and Events

  • [Oct 17, 2012] 1.0 Released!


Classifications

Owasp-incubator-trans-85.png Owasp-builders-small.png
Owasp-defenders-small.png
Apache 2 License
Project Type Files CODE.jpg