Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
8.3
-
None
-
Unknown
-
Description
Problem
The parameters parameter of the jira Macro is typed as java.util.Properties and converted through the generic BeanUtils path (there is no dedicated Converter<Properties> in xwiki-commons), which only understands a comma as the pair separator.
Anything else is accepted without any error: the whole string is parsed as a single name=value pair whose value is everything after the last =. The extra pairs are silently dropped and the field displayers just fall back to their defaults, so the page renders normally and the user gets no feedback at all.
Verified by adding throwaway rendering test cases to jira-macro-default (removed afterwards):
- parameters="field.url.label='custom label',aaa='1'" - both pairs parsed, in either order, and a space after the comma is tolerated.
- the same string with |, a space, or ; in place of the comma - a single entry, no error.
Impact
The syntax was never documented (the @PropertyDescription only says "extra parameters for sources, displayers and field displayers"), so a wrong separator is an easy mistake to make and impossible to diagnose from the rendered page.
Suggested fix
Either reject unparseable input with a Macro execution error, or - at a minimum - state the format in the @PropertyDescription, which is what the WYSIWYG Macro editor shows the user.
The documentation now describes it as "a comma-separated list of name=value pairs, values optionally single-quoted".