File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/main/java/org/commonwl/view/cwl Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 6464import com .fasterxml .jackson .databind .node .ArrayNode ;
6565import com .fasterxml .jackson .databind .node .ObjectNode ;
6666import com .fasterxml .jackson .databind .node .TextNode ;
67+ import org .yaml .snakeyaml .constructor .SafeConstructor ;
6768
6869/**
6970 * Provides CWL parsing for workflows to gather an overview
@@ -602,10 +603,8 @@ private String typeURIToString(String uri) {
602603 * @throws IOException
603604 */
604605 private JsonNode yamlPathToJson (Path path ) throws IOException {
605- Yaml reader = new Yaml ();
606+ Yaml reader = new Yaml (new SafeConstructor () );
606607 ObjectMapper mapper = new ObjectMapper ();
607- Path p ;
608-
609608 try (InputStream in = Files .newInputStream (path )) {
610609 return mapper .valueToTree (reader .load (in ));
611610 }
@@ -618,7 +617,7 @@ private JsonNode yamlPathToJson(Path path) throws IOException {
618617 * @return A JsonNode with the content of the document
619618 */
620619 private JsonNode yamlStreamToJson (InputStream yamlStream ) {
621- Yaml reader = new Yaml ();
620+ Yaml reader = new Yaml (new SafeConstructor () );
622621 ObjectMapper mapper = new ObjectMapper ();
623622 return mapper .valueToTree (reader .load (yamlStream ));
624623 }
You can’t perform that action at this time.
0 commit comments