Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/192#discussion_r91660989
  
    --- Diff: 
server/base/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java 
---
    @@ -118,6 +118,9 @@ public static void main(String[] args) throws Exception 
{
         }
     
         SAXParserFactory factory = SAXParserFactory.newInstance();
    +    
factory.setFeature("http://xml.org/sax/features/external-general-entities";, 
false);
    +    
factory.setFeature("http://xml.org/sax/features/external-parameter-entities";, 
false);
    +    
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd";,
 false);
    --- End diff --
    
    These features are very specific to a particular parser. The only parser 
that we can reasonably expect any users to be using is xerces-j 2.7.1, which 
was integrated into `rt.jar` since JDK6.
    
    So, I would just do the following instead of anything more complicated or 
speculative with respect to a particular parser:
    `factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl";, 
true);`
    
    If the user is really convoluting their environment to use a different 
parser, then I think they're sort of on their own anyway. But, this tool is 
typically run in the same security context as the user... and not by a remote 
service, so there really isn't a vulnerability out-of-the-box anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to