Class SecureXml

java.lang.Object
slash.common.helpers.SecureXml

public class SecureXml extends Object
XML parsing hardened against XXE and entity expansion attacks.

JAXB's Unmarshaller.unmarshal(InputStream|Reader|File|URL|InputSource) creates its own SAX parser which resolves external entities and external DTDs: a route file with a DOCTYPE can read local files into the converted output or make the server open network connections. Route formats (GPX, KML, RTZ, TCX, ...) never need a DOCTYPE, so it is rejected outright.

Author:
Christian Pesch