aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authormemesaregood <sifepe4679@yandex.ru>2024-05-16 18:40:23 +0300
committermemesaregood <sifepe4679@yandex.ru>2024-05-16 18:40:23 +0300
commit6879f2bcd6026d279826d3672e58ffca2b2e947e (patch)
tree95e1324866554e5b4152691d0e597ff0f0ccdfaa /src/main/java/org
parent6016ef5effa5a5f826e8f77bc8277897fec6e878 (diff)
downloadtrackermap-server-6879f2bcd6026d279826d3672e58ffca2b2e947e.tar.gz
trackermap-server-6879f2bcd6026d279826d3672e58ffca2b2e947e.tar.bz2
trackermap-server-6879f2bcd6026d279826d3672e58ffca2b2e947e.zip
Allow Date class in a JEXL whitelist
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/handler/ComputedAttributesHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
index 4293bd1fc..7c2fd70a5 100644
--- a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
+++ b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
@@ -41,6 +41,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.Date;
public class ComputedAttributesHandler extends BasePositionHandler {
@@ -63,7 +64,7 @@ public class ComputedAttributesHandler extends BasePositionHandler {
sandbox.allow(Math.class.getName());
List.of(
Double.class, Float.class, Integer.class, Long.class, Short.class,
- Character.class, Boolean.class, String.class, Byte.class)
+ Character.class, Boolean.class, String.class, Byte.class, Date.class)
.forEach((type) -> sandbox.allow(type.getName()));
features = new JexlFeatures()
.localVar(config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOCAL_VARIABLES))