[MAGNOLIA-8261] URI2RepositoryMapping does not accept .html anymore Created: 17/Dec/21  Updated: 21/Dec/21  Resolved: 20/Dec/21

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.2.14
Fix Version/s: 6.2.15

Type: Bug Priority: Major
Reporter: Antonio Tuor Assignee: Jaroslav Simak
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MULTISITE-104 using URIPrefix doest work for .html Open
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
[X]* Update the release notes of 6.2.14 with this as known bug
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Sprint: Global Maintenance 4

 Description   

Steps to reproduce

  1. Suppose you have two separeted language trees, e.g. site-de and site-fr
  2. Configure a site with mapping for the sites:
  • /de -> /site-de
  • /fr -> /site-fr
  1. Open the site home-page with /de.html or /fr.html will not use the correct site, which may results in a wrong theme
  2. Open the site /de or /fr works as accepted

Expected results

Correct site is used for a URIPrefix even if it ends with `.html` instead of `/`

Actual results

Wrong site definition is used, and thus wrong theme is displayed

Workaround

With an additional site-mapping e.g. `for /de.html` this can be fixed, but it's not a nice solution, since it could blow up the configuration

Development notes

This bug was introduced with MAGNOLIA-8234 and this commit: https://git.magnolia-cms.com/projects/PLATFORM/repos/main/commits/3c965c8b66b4e02bc0c40b7c1f96d45b9b888cef

This is a Major Bug for us, because of the log4shell exploit, since some production environments are affected after rolling out the new magnolia version



 Comments   
Comment by Antonio Tuor [ 20/Dec/21 ]

Hi Jaroslav @jsimak

Nice that this has already been fixed. But I'm not sure, if this covers all cases, have you checked what happends for urls with fragments or query parameters?
e.g `?myParam=xyz` or `#myAnchorTag`
Is the correct site mapped in this case?

Best regards,
Antonio

Comment by Jaroslav Simak [ 20/Dec/21 ]

Hi atuor,

URI coming into the URI2RepositoryMapping#matches does not contain any query parameters or anchors, so no need to worry about those.

Best Regards,
Jaroslav

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