smbdav
Class BlockedEntityResolver

java.lang.Object
  extended bysmbdav.BlockedEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

public class BlockedEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver

Entity resolver which prevents external entities from being referenced. This is used to prevent various XML-based attacks.

Author:
Eric Glass

Field Summary
static BlockedEntityResolver INSTANCE
          Singleton resolver instance.
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          Returns an empty stream in response to an attempt to resolve an external entity, and logs a warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final BlockedEntityResolver INSTANCE
Singleton resolver instance.

Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
Returns an empty stream in response to an attempt to resolve an external entity, and logs a warning.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - The public identifier of the external entity.
systemId - The system identifier of the external entity.
Returns:
An empty InputSource.


Copyright © 2004 Eric Glass