Skip to content

Commit

Permalink
update yaml constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismcg14 committed May 6, 2024
1 parent 5aacc3b commit 7d1a11c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7d1a11c

Please sign in to comment.