Search in sources :

Example 1 with AnyTypePermission

use of com.thoughtworks.xstream.security.AnyTypePermission in project drools by kiegroup.

the class XStreamUtils method internalCreateTrustingXStream.

/**
 * Only use for XML or JSON that comes from a 100% trusted source.
 * The XML/JSON must be as safe as executable java code.
 * Otherwise, you MUST use {@link #createNonTrustingXStream()}.
 */
private static XStream internalCreateTrustingXStream(XStream xstream) {
    setupDefaultSecurity(xstream);
    // Presumes the XML content comes from a trusted source!
    xstream.addPermission(new AnyTypePermission());
    return xstream;
}
Also used : AnyTypePermission(com.thoughtworks.xstream.security.AnyTypePermission)

Aggregations

AnyTypePermission (com.thoughtworks.xstream.security.AnyTypePermission)1