From cc001d62c370af335e107eaad9ff48cac5183a82 Mon Sep 17 00:00:00 2001 From: aboyko Date: Tue, 18 Oct 2022 14:49:19 -0400 Subject: [PATCH] Allow only primary type constructors for yaml parsing --- .../boot/dash/cf/deployment/ApplicationManifestHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.cf/src/org/springframework/ide/eclipse/boot/dash/cf/deployment/ApplicationManifestHandler.java b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.cf/src/org/springframework/ide/eclipse/boot/dash/cf/deployment/ApplicationManifestHandler.java index 9ce8f8b01..fda789c74 100644 --- a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.cf/src/org/springframework/ide/eclipse/boot/dash/cf/deployment/ApplicationManifestHandler.java +++ b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.cf/src/org/springframework/ide/eclipse/boot/dash/cf/deployment/ApplicationManifestHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015, 2017 Pivotal, Inc. + * Copyright (c) 2015, 2022 Pivotal, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -49,6 +49,7 @@ import org.springsource.ide.eclipse.commons.livexp.util.ExceptionUtil; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.DumperOptions.FlowStyle; import org.yaml.snakeyaml.Yaml; +import org.yaml.snakeyaml.constructor.SafeConstructor; import com.google.common.collect.ImmutableList; @@ -984,7 +985,7 @@ public class ApplicationManifestHandler { InputStream inputStream = getInputStream(); if (inputStream != null) { - Yaml yaml = new Yaml(); + Yaml yaml = new Yaml(new SafeConstructor()); try { Object results = yaml.load(inputStream);