[MAGNOLIA-5808] CacheFilter still modifying parameters Created: 12/Jun/14  Updated: 02/Jul/14  Resolved: 01/Jul/14

Status: Closed
Project: Magnolia
Component/s: cache
Affects Version/s: 4.5.12
Fix Version/s: 4.5.20

Type: Bug Priority: Neutral
Reporter: Richard Unger Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: quickwin, support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any Browser tested (Firefox, IE)


Issue Links:
Cloners
is cloned by MGNLCACHE-63 CacheFilter still modifying parameters Closed
Relates
relates to MAGNOLIA-5744 Semicolons doubled by CacheFilter Closed
causality
caused by MAGNOLIA-5215 CLONE - URL's with multiple times a p... Closed
relation
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

 Description   

It is fine to sort the parameters themselves, those can arrive in any order, and the order is not defined in any specification.
But the parameter values, when arrays, cannot be sorted. Even if you say that your cache filter does not support the order of the values (hard to understand, but ok), it is simply not ok that the cache filter performs the sorting in place, thus modifying the order for all subsequent code dealing with the request. The correct order cannot be recovered.



 Comments   
Comment by Richard Unger [ 12/Jun/14 ]

I disagree strongly with your explanation and that the solution is ok as fixed in the bug.
I understand the reason, but it is simply not correct to do this in this way.
It is fine to sort the parameters themselves, those can arrive in any order, and the order is not defined in any specification.
But the parameter values, when arrays, cannot be sorted. Even if you say that your cache filter does not support the order of the values (hard to understand, but ok), it is simply not ok that the cache filter performs the sorting in place, thus modifying the order for all subsequent code dealing with the request. The correct order cannot be recovered.
Your filter should not be introducing such a side effect, that isn't correct.

Generated at Mon Feb 12 04:08:34 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.