Skip to content

Instantly share code, notes, and snippets.

asudhakar02

Block or report user

Report or block asudhakar02

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@asudhakar02
asudhakar02 / SecureXMLParser.java
Created Mar 10, 2015
Secure SAXParserFactory that prevents XXE
View SecureXMLParser.java
import javax.xml.parsers.ParserConfigurationException; // catching unsupported features
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.SAXNotRecognizedException; // catching unknown features
import org.xml.sax.SAXNotSupportedException; // catching known but unsupported features
import org.xml.sax.XMLReader;
...
You can’t perform that action at this time.