From 0a7840005b3fffc9d85bd67b2a3ccad613618373 Mon Sep 17 00:00:00 2001 From: Florian Esser Date: Thu, 12 Sep 2024 10:00:45 +0200 Subject: [PATCH] feat: add IntRange to Groovy restriction whitelist --- .../groovy/sandbox/internal/RestrictiveGroovyInterceptor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/plugins/eu.esdihumboldt.util.groovy.sandbox/src/eu/esdihumboldt/util/groovy/sandbox/internal/RestrictiveGroovyInterceptor.java b/util/plugins/eu.esdihumboldt.util.groovy.sandbox/src/eu/esdihumboldt/util/groovy/sandbox/internal/RestrictiveGroovyInterceptor.java index dc00b90b54..f8a2ff3860 100644 --- a/util/plugins/eu.esdihumboldt.util.groovy.sandbox/src/eu/esdihumboldt/util/groovy/sandbox/internal/RestrictiveGroovyInterceptor.java +++ b/util/plugins/eu.esdihumboldt.util.groovy.sandbox/src/eu/esdihumboldt/util/groovy/sandbox/internal/RestrictiveGroovyInterceptor.java @@ -55,6 +55,7 @@ import eu.esdihumboldt.util.groovy.sandbox.GroovyRestrictionException; import groovy.lang.Closure; import groovy.lang.GString; +import groovy.lang.IntRange; import groovy.lang.MissingPropertyException; import groovy.lang.Range; import groovy.lang.Script; @@ -156,6 +157,7 @@ public class RestrictiveGroovyInterceptor extends GroovyInterceptor { allowedClasses.add(LinkedHashSet.class); allowedClasses.add(ArrayList.class); allowedClasses.add(Range.class); + allowedClasses.add(IntRange.class); allowedClasses.add(GStringImpl.class); // Some more collections