diff --git a/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java b/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java index bbd6655..9da715e 100644 --- a/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java +++ b/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java @@ -27,8 +27,10 @@ import org.dom4j.DocumentHelper; import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWriter; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; +import org.yaml.snakeyaml.constructor.SafeConstructor; import java.io.*; import java.security.GeneralSecurityException; @@ -439,7 +441,7 @@ public void setHeaders(String headers, RequestBuilder request){ map = new HashMap<>(); Object object = null; try { - Yaml yaml = new Yaml(new Constructor(Map.class)); + Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions())); map = yaml.load(headers); } catch (Exception e) { map = null;