diff options
author | memesaregood <sifepe4679@yandex.ru> | 2023-06-15 17:01:34 +0300 |
---|---|---|
committer | memesaregood <sifepe4679@yandex.ru> | 2023-06-15 17:01:34 +0300 |
commit | e7ca96d67650f0d8059983ff63c6ea31b562b481 (patch) | |
tree | 2c07897a19a1bcbd0c3ece380cff8d4dfaabe098 /src/main/java/org/traccar | |
parent | 4a64ef748e207406be4f7aa7538d59b7b0f9735c (diff) | |
download | trackermap-server-e7ca96d67650f0d8059983ff63c6ea31b562b481.tar.gz trackermap-server-e7ca96d67650f0d8059983ff63c6ea31b562b481.tar.bz2 trackermap-server-e7ca96d67650f0d8059983ff63c6ea31b562b481.zip |
Allowed primitive Java types in JEXL Engine
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/handler/ComputedAttributesHandler.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java index d384bbffc..24d853bbe 100644 --- a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java +++ b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java @@ -65,6 +65,14 @@ public class ComputedAttributesHandler extends BaseDataHandler { JexlSandbox sandbox = new JexlSandbox(false); sandbox.allow("com.safe.Functions"); sandbox.allow(Math.class.getName()); + sandbox.allow(Double.class.getName()); + sandbox.allow(Float.class.getName()); + sandbox.allow(Integer.class.getName()); + sandbox.allow(Long.class.getName()); + sandbox.allow(Short.class.getName()); + sandbox.allow(Character.class.getName()); + sandbox.allow(Boolean.class.getName()); + sandbox.allow(String.class.getName()); features = new JexlFeatures() .localVar(config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOCAL_VARIABLES)) .loops(config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOOPS)) |