NSHARMA105946 (Community Member) asked a question.

Improper Restriction of XML External Entity
Reference (CWE ID 611)

I am getting above vulnerability in below code

 

tf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);

Transformer transformer = tf.newTransformer();

transformer.transform(domSource, result);

 

also after using below code xml file is not giving any data, could you please help?

tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");

tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");


Topics (3)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.