From b959713ac852b71c93d8eeaa660899da7b50cb45 Mon Sep 17 00:00:00 2001 From: cfmitrah Date: Wed, 10 Jun 2026 17:06:33 +0530 Subject: [PATCH] LDEV-6287 :: Improved the exception message. --- .../java/lucee/runtime/interpreter/ref/var/Variable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/lucee/runtime/interpreter/ref/var/Variable.java b/core/src/main/java/lucee/runtime/interpreter/ref/var/Variable.java index bebf89532db..a7b80268425 100644 --- a/core/src/main/java/lucee/runtime/interpreter/ref/var/Variable.java +++ b/core/src/main/java/lucee/runtime/interpreter/ref/var/Variable.java @@ -61,13 +61,13 @@ public Variable(Ref parent, Ref refKey, boolean limited) { @Override public Object getValue(PageContext pc) throws PageException { - if (limited) throw new SecurityInterpreterException("invalid syntax, variables are not supported."); + if (limited) throw new SecurityInterpreterException("Dynamic evaluation blocked: variable expansion is not permitted in this context."); return pc.get(parent.getCollection(pc), KeyImpl.init(getKeyAsString(pc))); } @Override public Object touchValue(PageContext pc) throws PageException { - if (limited) throw new SecurityInterpreterException("invalid syntax, variables are not supported."); + if (limited) throw new SecurityInterpreterException("Dynamic evaluation blocked: variable expansion is not permitted in this context."); Object p = parent.touchValue(pc); if (p instanceof Query) { Object o = ((Query) p).getColumn(KeyImpl.init(getKeyAsString(pc)), null); @@ -80,7 +80,7 @@ public Object touchValue(PageContext pc) throws PageException { @Override public Object getCollection(PageContext pc) throws PageException { - if (limited) throw new SecurityInterpreterException("invalid syntax, variables are not supported."); + if (limited) throw new SecurityInterpreterException("Dynamic evaluation blocked: variable expansion is not permitted in this context."); Object p = parent.getValue(pc); if (p instanceof Query) { return ((Query) p).getColumn(KeyImpl.init(getKeyAsString(pc))); @@ -90,7 +90,7 @@ public Object getCollection(PageContext pc) throws PageException { @Override public Object setValue(PageContext pc, Object obj) throws PageException { - if (limited) throw new SecurityInterpreterException("invalid syntax, variables are not supported."); + if (limited) throw new SecurityInterpreterException("Dynamic evaluation blocked: variable expansion is not permitted in this context."); return pc.set(parent.touchValue(pc), KeyImpl.init(getKeyAsString(pc)), obj); }