[MGNLCACHE-16] URL's with multiple times a parameter with the same name cause cache collisions. Created: 16/Jul/13  Updated: 01/Oct/13  Resolved: 05/Sep/13

Status: Closed
Project: Cache Modules
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0.3

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
is cloned by MAGNOLIA-5215 CLONE - URL's with multiple times a p... 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

 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.


Generated at Sun Feb 11 23:51:22 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.