Class HardenedOutputResolver

  • All Implemented Interfaces:
    net.sf.saxon.lib.OutputURIResolver

    public class HardenedOutputResolver
    extends net.sf.saxon.lib.StandardOutputResolver
    Based on StandardOutputResolver, this resolver restricts the access to the local file system by using a FilesystemFilter.

    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 is FilesystemFilter.ENVIRON. Paths are separated by FilesystemFilter.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 Detail

      • HardenedOutputResolver

        public HardenedOutputResolver()
    • Method Detail

      • resolve

        public Result resolve​(String href,
                              String base)
                       throws net.sf.saxon.trans.XPathException
        Specified by:
        resolve in interface net.sf.saxon.lib.OutputURIResolver
        Overrides:
        resolve in class net.sf.saxon.lib.StandardOutputResolver
        Throws:
        net.sf.saxon.trans.XPathException