@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class XMLUtils extends Object
Constructor and Description |
---|
XMLUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
safeTransform(Source source,
Result out)
Transform the source to the output in a manner that is protected against XXE attacks.
|
public static void safeTransform(@Nonnull Source source, @Nonnull Result out) throws TransformerException, SAXException
disableXXEPrevention
to true
.source
- The XML input to transform. - This should be a StreamSource
or a
SAXSource
in order to be able to prevent XXE attacks.out
- The Result of transforming the source
.TransformerException
SAXException
Copyright © 2019. All rights reserved.