Skip to content

Commit cc001d6

Browse files
committed
Allow only primary type constructors for yaml parsing
1 parent b91aec9 commit cc001d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eclipse-extensions/org.springframework.ide.eclipse.boot.dash.cf/src/org/springframework/ide/eclipse/boot/dash/cf/deployment/ApplicationManifestHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2017 Pivotal, Inc.
2+
* Copyright (c) 2015, 2022 Pivotal, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -49,6 +49,7 @@
4949
import org.yaml.snakeyaml.DumperOptions;
5050
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
5151
import org.yaml.snakeyaml.Yaml;
52+
import org.yaml.snakeyaml.constructor.SafeConstructor;
5253

5354
import com.google.common.collect.ImmutableList;
5455

@@ -984,7 +985,7 @@ protected Map<Object, Object> parseManifestFromFile() throws Exception {
984985
InputStream inputStream = getInputStream();
985986

986987
if (inputStream != null) {
987-
Yaml yaml = new Yaml();
988+
Yaml yaml = new Yaml(new SafeConstructor());
988989

989990
try {
990991
Object results = yaml.load(inputStream);

0 commit comments

Comments
 (0)