Configure XStream security and resolve itest bundles (#8663)

* Configures XStream security to prevent "Security framework of XStream not initialized, XStream is probably vulnerable" warnings.
* Resolves the itest bundles for the upgrade to XStream 1.4.13

Related to openhab/openhab-core#1688

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2020-10-04 22:10:04 +02:00
committed by GitHub
parent 3ea3570306
commit be7e9c9680
12 changed files with 31 additions and 21 deletions

View File

@@ -148,6 +148,8 @@ public class LcnPchkDiscoveryService extends AbstractDiscoveryService {
ServicesResponse xmlToServiceResponse(String response) {
XStream xstream = new XStream(new StaxDriver());
XStream.setupDefaultSecurity(xstream);
xstream.allowTypesByWildcard(new String[] { ServicesResponse.class.getPackageName() + ".**" });
xstream.setClassLoader(getClass().getClassLoader());
xstream.autodetectAnnotations(true);
xstream.alias("ServicesResponse", ServicesResponse.class);