jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: XML files with external DTD indexing
Date Wed, 26 May 2010 09:24:09 GMT

2010/5/26 Maxime B├ęgnis <maxime@neodoc.biz>:
> I use Jackrabbit 1.4

The XML parser in Jackrabbit 1.x unfortunately doesn't prevent the
loading of external resources. This is issue is solved by the
Tika-based parsers used in Jackrabbit 2.x.

> I found a tricky workaround, I set the system properties for the default
> XML parsers to custom parsers of mine :
> [...]
> The application contains a lot of libraries dealing with XML stuff, so I
> hope this trick won't break anything(it didn't so far).

An alternative and more localized fix would be to patch the
jackrabbit-text-extractors code with the following extra method in the
org.apache.jackrabbit.extractor.ExtractorHandler class:

    public InputSource resolveEntity(String publicId, String systemId) {
        return new InputSource(new ByteArrayInputStream(new byte[0]));

If there's demand, I can include this fix in the upcoming 1.6.2 release.


Jukka Zitting

View raw message