diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/generic-whitelist b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/generic-whitelist index a13119ef6..7c68a2e74 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/generic-whitelist +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/generic-whitelist @@ -267,6 +267,7 @@ method java.lang.String split java.lang.String method java.lang.String split java.lang.String int method java.lang.String startsWith java.lang.String method java.lang.String startsWith java.lang.String int +method java.lang.String stripIndent method java.lang.String substring int method java.lang.String substring int int method java.lang.String toCharArray diff --git a/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java b/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java index 470eabf9e..c0979241e 100644 --- a/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java +++ b/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java @@ -120,8 +120,9 @@ static void sanity(URL definition) throws Exception { "java.util.Iterator", "groovy.lang.Closure"), // Overrides CharSequence.isEmpty in Java 15+. new MethodSignature(String.class, "isEmpty"), - // Does not exist until Java 15. + // Do not exist until Java 15. new MethodSignature(CharSequence.class, "isEmpty"), + new MethodSignature(String.class, "stripIndent"), // Override the corresponding RandomGenerator methods in Java 17+. new MethodSignature(Random.class, "nextBoolean"), new MethodSignature(Random.class, "nextBytes", byte[].class),