dsmiley commented on code in PR #962:
URL: https://github.com/apache/solr/pull/962#discussion_r951401025


##########
solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java:
##########
@@ -376,10 +377,12 @@ protected long getConfigVersion(SolrCore core) {
    *
    * @return The loaded {@link ElevationProvider}; not null.
    */
-  private ElevationProvider loadElevationProvider(SolrCore core) throws 
Exception {
-    XmlConfigFile cfg;
+  private ElevationProvider loadElevationProvider(SolrCore core) throws 
IOException, SAXException {
+    InputStream inputStream = null;
+    Document xmlDocument;
     try {
-      cfg = new XmlConfigFile(core.getResourceLoader(), configFileName);
+      inputStream = core.getResourceLoader().openResource(configFileName);
+      xmlDocument = SafeXMLParsing.parseUntrustedXML(log, inputStream);

Review Comment:
   @uschindler -- you added the `SafeXMLParsing` library.  My instinct is use 
use the `parseConfigXML` method for the `elevate.xml` because it conveniently 
takes a SolrResourceLoader.  It supports x:include too but so-what; right?  
It's scoped to the SRL so I don't see how it could be a problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to