Package de.wwu.scdh.saxon.harden
Class HardenedURIResolver
- java.lang.Object
-
- net.sf.saxon.lib.StandardURIResolver
-
- de.wwu.scdh.saxon.harden.HardenedURIResolver
-
- All Implemented Interfaces:
URIResolver
,net.sf.saxon.trans.NonDelegatingURIResolver
public class HardenedURIResolver extends net.sf.saxon.lib.StandardURIResolver
Based onStandardURIResolver
, this resolver restricts the access to the local file system by using aFilesystemFilter
.The allowed locations are set from a system property or an environment variable, which define a list of paths. The name of the system property is
FileSystemFilter.PROPERTY
. The name of the environment variable isFilesystemFilter.ENVIRON
. Paths are separated byFilesystemFilter.SEPARATOR
.Configuration errors result in an empty set of allowed paths, but will be notified on stderr.
~
can be used to point to the user's home directory.- See Also:
FilesystemFilter
-
-
Constructor Summary
Constructors Constructor Description HardenedURIResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Source
resolve(String href, String base)
-
-
-
Method Detail
-
resolve
public Source resolve(String href, String base) throws net.sf.saxon.trans.XPathException
- Specified by:
resolve
in interfaceURIResolver
- Overrides:
resolve
in classnet.sf.saxon.lib.StandardURIResolver
- Throws:
net.sf.saxon.trans.XPathException
-
-