[xmltv] Handle possible XXE injection (#15467)
XMLInputFactory: Disable property IS_SUPPORTING_EXTERNAL_ENTITIES which allows injecting external entities. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
parent
c9e6417754
commit
55789bd792
|
@ -54,6 +54,7 @@ public class XmlTVHandlerFactory extends BaseThingHandlerFactory {
|
|||
public XmlTVHandlerFactory(final @Reference TimeZoneProvider timeZoneProvider) throws JAXBException {
|
||||
this.timeZoneProvider = timeZoneProvider;
|
||||
this.unmarshaller = JAXBContext.newInstance(Tv.class).createUnmarshaller();
|
||||
xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
|
||||
xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue