mirror of https://github.com/apache/lucene.git
SOLR-4881: Fix DocumentAnalysisRequestHandler to correctly use EmptyEntityResolver to prevent loading of external entities like UpdateRequestHandler does
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1487976 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fecb6fb0a2
commit
7239a57a51
|
@ -216,6 +216,10 @@ Bug Fixes
|
|||
case for handling TermQuery to prevent NullPointerException if reader does
|
||||
not have fields. (Bao Yang Yang, Uwe Schindler)
|
||||
|
||||
* SOLR-4881: Fix DocumentAnalysisRequestHandler to correctly use
|
||||
EmptyEntityResolver to prevent loading of external entities like
|
||||
UpdateRequestHandler does. (Hossman, Uwe Schindler)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.solr.request.SolrQueryRequest;
|
|||
import org.apache.solr.schema.FieldType;
|
||||
import org.apache.solr.schema.IndexSchema;
|
||||
import org.apache.solr.schema.SchemaField;
|
||||
import org.apache.solr.util.EmptyEntityResolver;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -90,6 +91,8 @@ public class DocumentAnalysisRequestHandler extends AnalysisRequestHandlerBase {
|
|||
super.init(args);
|
||||
|
||||
inputFactory = XMLInputFactory.newInstance();
|
||||
EmptyEntityResolver.configureXMLInputFactory(inputFactory);
|
||||
inputFactory.setXMLReporter(xmllog);
|
||||
try {
|
||||
// The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe
|
||||
// XMLInputFactory, as that implementation tries to cache and reuse the
|
||||
|
@ -103,7 +106,6 @@ public class DocumentAnalysisRequestHandler extends AnalysisRequestHandlerBase {
|
|||
// isimplementation specific.
|
||||
log.debug("Unable to set the 'reuse-instance' property for the input factory: " + inputFactory);
|
||||
}
|
||||
inputFactory.setXMLReporter(xmllog);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue