Adding new mail server in Lucee Admin fails

Description

If “Limit variable evaluation in functions/tags” is switched on, then adding a new mail server in Lucee Admin fails with “invalid syntax, variables are not supported” error message. Workaround is to temporarily switch off the limit variables option.

Failing code is in services.mail.cfm where variables are being used within multiple isdefined() statements.

Eg. services_mail_cfm414$cf.call(/admin/services.mail.cfm:119)

Environment

OS: Linux (6.6.31+rpt-rpi-2712) 64bit
Java Version: 17.0.11
Tomcat Version: 9.0.11
Lucee Version: 6.0.3.1

Activity

Show:

Pothys - MitrahSoft 26 August 2024 at 15:00
Edited

, I investigated this ticket using Lucee version 6.1.1.62 with the 'Limit variable evaluation in functions/tags' option enabled. After adding the new mail server in the Lucee admin, it no longer throws an error, and the Lucee administrator pages work fine.

Michael Offner 21 August 2024 at 14:06
Edited

i have rewritten all the code using isDefined and cfparam for evaluation, can you please test all the pages in the Lucee admin affected
https://github.com/lucee/Lucee/commit/1da80725ba3bbc45abd9e90743f011fcd4dfabae

and if all is good, set it to resolved.

Zac Spitzer 23 July 2024 at 07:03

line 3 is 119

<cfloop index="idx" from="1" to="#arrayLen(data.hosts)#"> <cfif isDefined("data.rows[#idx#]") and data.hosts[idx] NEQ ""> <cfparam name="data.ports[idx]" default="25">

throws

"invalid syntax, variables are not supported.;lucee.runtime.interpreter.SecurityInterpreterException: invalid syntax, variables are not supported. /admin/services.mail.cfm:119 /admin/web.cfm:516 /admin/web.cfm:513 /admin/index.cfm:3 at lucee.runtime.interpreter.ref.var.Variable.getValue(Variable.java:64) at lucee.runtime.interpreter.CFMLExpressionInterpreter.interpretPart(CFMLExpressionInterpreter.java:277) at lucee.runtime.interpreter.VariableInterpreter.parse(VariableInterpreter.java:492) at lucee.runtime.interpreter.VariableInterpreter.getVariableEL(VariableInterpreter.java:224) at services_mail_cfm414$cf.call(/admin/services.mail.cfm:119) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1050) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:944) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:925) at web_cfm$cf.call_000007(/admin/web.cfm:516) at web_cfm$cf.call(/admin/web.cfm:513) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1050) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:944) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:925) at index_cfm$cf.call(/admin/index.cfm:3) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1050) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:944) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:213) at lucee.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:100) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2731) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2718) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2689) at lucee.runtime.engine.Request.exe(Request.java:45) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1155) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1112) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)

Pothys - MitrahSoft 22 July 2024 at 07:33
Edited

I've checked and confirmed the issue with Lucee version 6.1.1.50-SNAPSHOT. When we set the Limit variable evaluation in functions/tags to true and try to add a new mail server in the admin, it throws the 'invalid syntax, variables are not supported' error.

https://dev.lucee.org/t/invalid-syntax-variables-are-not-supported-error-when-adding-mail-server-in-lucee-admin/14083/10

Andreas R 18 July 2024 at 18:48

Just posting a link to the forum related page:

https://dev.lucee.org/t/invalid-syntax-variables-are-not-supported-error-when-adding-mail-server-in-lucee-admin/14083/10

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 18 July 2024 at 15:42
Updated 26 August 2024 at 15:01
Resolved 26 August 2024 at 15:01

Flag notifications