Item12781: Configure: SimpleFreeMarker buggy with variables that expand to query expressions

pencil
Priority: Urgent
Current State: No Action Required
Released In: 1.2.0
Target Release: minor
Applies To: Engine
Component: Configure
Branches: trunk
Reported By: JanKrueger
Waiting For:
Last Change By: CrawfordCurrie
Under circumstances I can't pin down exactly, when the login dialog is rendered, a bug in the template parser is exposed:

Suppose you have a template variable that expands to something containing yet another {$foo} expression. The parser inserts that into your page. Once all template variables have been expanded, there's another step that treats {$foo?bar} expressions, using a regex substitution along the lines of \{.*\?.*\} . Since the output now contains {$foo} that weren't there before, the substitution can match them – and since they don't contain a literal question mark, the parser may end up interpreting a huge chunk of the document (spanning everything from the newly inserted expression and an as-of-yet unexpanded {$foo?bar} expression further down) as a single expression. That expression is almost certainly invalid, and we end up getting a really ugly error message complaining about a missing template variable.

It seems much more reasonable to do the {$foo?bar} code in the loop that iterates over the template variables, so that we can use a much more specific regex and nip this kind of problem in the bud.

-- JanKrueger - 14 Mar 2014

SimpleFreeMarker has been removed since this was closed.

-- CrawfordCurrie - 15 Mar 2015

 

ItemTemplate edit

Summary Configure: SimpleFreeMarker buggy with variables that expand to query expressions
ReportedBy JanKrueger
Codebase trunk
SVN Range
AppliesTo Engine
Component Configure
Priority Urgent
CurrentState No Action Required
WaitingFor
Checkins distro:54e01a8ad17a distro:2b58221be313
TargetRelease minor
ReleasedIn 1.2.0
CheckinsOnBranches trunk
trunkCheckins distro:54e01a8ad17a distro:2b58221be313
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r5 - 15 Mar 2015, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy