[MAGNOLIA-5215] CLONE - URL's with multiple times a parameter with the same name cause cache collisions. Created: 02/Aug/13  Updated: 01/Jul/14  Resolved: 03/Sep/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 4.5
Fix Version/s: 4.4.12, 4.5.12

Type: Bug Priority: Major
Reporter: Rico Jansen Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: vpro
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX , Java 1.6


Issue Links:
Cloners
clones MGNLCACHE-16 URL's with multiple times a parameter... Closed
causality
is causing MAGNOLIA-5744 Semicolons doubled by CacheFilter Closed
is causing MAGNOLIA-5808 CacheFilter still modifying parameters Closed
is causing MGNLCACHE-63 CacheFilter still modifying parameters 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   

We have a page with a model class that uses one parameter ("constraint") which gets set multiple times in the url. e.g.
http://www.wetenschap24.nl/ondemand.html?constraint=extra_field_nl_vpro_subsite%3Alabyrint&constraint=extra_field_nl_vpro_page_type%3AVideo

However this does not work properly, all pages which end with same 'constraint' parameter get cached under the same cacheentry.

This is caused by line 146 of info.magnolia.module.cache.cachepolicy.Default:
params = MgnlContext.getWebContext().getParameters();

This function flattens the parameters so every one only occurs once.
info.magnolia.context.WebContextImpl.getParameters() even warns for that
effect.

This causes problems for every page which uses multiple times the same parameter.



 Comments   
Comment by Jaroslav Simak [ 02/Sep/13 ]

Reopened: port to 4.4.x

Comment by Jan Haderka [ 03/Sep/13 ]

Since we use semicolon as separator of values we should also escape semicolon in original values (maybe just by doubling it) to ensure we do not get false positive when someone passes param w/ semicolon in the value.

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