[MAGNOLIA-4726] Array-Style GET Parameters break rendering Created: 12/Dec/12  Updated: 03/Dec/13  Resolved: 14/Dec/12

Status: Closed
Project: Magnolia
Component/s: rendering
Affects Version/s: 4.5
Fix Version/s: 4.5.8, 5.0

Type: Bug Priority: Major
Reporter: Richard Unger Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: rendering, stk
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia 4.5 EE, CE running under Linux, but I doubt this affects the problem.


Issue Links:
relation
is related to MAGNOLIA-4798 Remove workaround caused by Array-sty... Open
is related to MAGNOLIA-5154 The population of the Model with requ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Any request containing array-style GET parameters causes rendering to fail.

Try it out using:
http://demopublic.magnolia-cms.com/demo-project.html?checkbox[]=1

For example, parameters are normally sent in this syntax when a form contains multiple checkboxes belonging to the same group.

The Problem does not occur in Magnolia 4.4.8
The Problem occurs in Magnolia 4.5.x (I didn't test all versions)



 Comments   
Comment by Jaroslav Simak [ 14/Dec/12 ]

Commits for master branch (i forgot to add ticket number to commit message)

Comment by Jaroslav Simak [ 14/Dec/12 ]

Reason why this fails in magnolia 4.5 is another version of org.apache.commons.beanutils.BeanUtils it uses. Method org.apache.commons.beanutils.BeanUtils.populate(Object, Map) expects a numeric index between square brackets. In older version of org.apache.commons.beanutils.BeanUtils when there is no index between those brackets nothing happens and processing goes on. In newer version an exception is thrown and rendering is stopped. What i also noticed is that if you send multiple values with same name in query string you will get only first one.
By the way according to RFC 3986 characters "[" and "]" are reserved characters and should not be used.

Anyway .. square brackets in url are now handled as in 4.4. version and will not break rendering.

Generated at Mon Feb 12 03:58:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.