From 66a774b31d9368bf547ad4aab772339c6becce77 Mon Sep 17 00:00:00 2001 From: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:31:35 +0200 Subject: [PATCH] [JENKINS-71658] Update plugin dependencies (#277) Co-authored-by: Daniel Beck --- pom.xml | 25 ------------------- .../plugins/envinject/util/TestUtils.java | 6 ++++- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index 57d126a3..2fb4c276 100644 --- a/pom.xml +++ b/pom.xml @@ -86,31 +86,6 @@ import pom - - - org.jenkins-ci.plugins - junit - 1.63 - - - org.jenkins-ci.plugins - matrix-project - 771.v574584b_39e60 - - - org.jenkins-ci.plugins - script-security - 1158.v7c1b_73a_69a_08 - - - org.jenkins-ci.plugins.workflow - workflow-support - 820.vd1a_6cc65ef33 - diff --git a/src/test/java/org/jenkinsci/plugins/envinject/util/TestUtils.java b/src/test/java/org/jenkinsci/plugins/envinject/util/TestUtils.java index 371d963a..c024bdd8 100644 --- a/src/test/java/org/jenkinsci/plugins/envinject/util/TestUtils.java +++ b/src/test/java/org/jenkinsci/plugins/envinject/util/TestUtils.java @@ -2,6 +2,7 @@ import hudson.model.FreeStyleProject; import edu.umd.cs.findbugs.annotations.NonNull; +import org.htmlunit.html.HtmlForm; import org.jvnet.hudson.test.JenkinsRule; /** @@ -19,6 +20,9 @@ public class TestUtils { */ public static void saveConfigurationAs(@NonNull JenkinsRule jenkins, @NonNull FreeStyleProject project, @NonNull String userId) throws Exception { JenkinsRule.WebClient w = jenkins.createWebClient().login(userId); - jenkins.submit(w.getPage(project, "configure").getFormByName("config")); + final HtmlForm formByName = w.getPage(project, "configure").getFormByName("config"); + // Workaround for SECURITY-2450 in Script Security 1172.v35f6a_0b_8207e and newer + formByName.getInputsByName("oldScript").forEach(input -> input.setValue("different value to force behavior when modified")); + jenkins.submit(formByName); } }