[MAGNOLIA-9188] RangeSupportFilter wrongly encodes content-disposition header Created: 16/Nov/23  Updated: 01/Feb/24  Resolved: 05/Dec/23

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 6.2.38, 6.2.39, 6.2.40
Fix Version/s: 6.3.0, 6.2.41

Type: Bug Priority: Critical
Reporter: Teresa Miyar Assignee: Quach Hao Thien
Resolution: Fixed Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: 3h
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2023-11-16 at 15.26.12.png    
Issue Links:
Problem/Incident
causality
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)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Team: Nucleus
Work Started:
Approved:
Yes

 Description   

Reproduce

  • Make a range request:
    curl https://demopublic.magnolia-cms.com/dam/jcr:e236c74c-6b35-4467-b322-933419ecfd87/beach.svg -i -H "Range: bytes=0-1023"
    

Expected
Content disposition should be set correctly (no escaped quotes)

Actual
filename=\"name\" 

HTTP/1.1 206 
Date: Thu, 16 Nov 2023 14:53:02 GMT
Content-Type: image/svg+xml;charset=UTF-8
Content-Length: 1024
Connection: keep-alive
Set-Cookie: JSESSIONID=39A5752BB6EF131E69032C1648706272; Path=/; Secure; HttpOnly; SameSite=Strict
X-Magnolia-Registration: Registered
Cache-Control: max-age=600, public
Expires: Thu, 16 Nov 2023 15:03:02 GMT
Content-Disposition: attachment; filename=\"beach.svg\"
Last-Modified: Thu, 16 Jul 2015 11:47:36 GMT
ETag: 8CB21A8F92D008BB48A26E63DDC10DA45732918E
Accept-Ranges: bytes
Content-Range: bytes 0-1023/3857

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 113.4 113.4" enable-background="new 0 0 113.4 113.4" xml:space="preserve">
<path fill="#FFFFFF" d="M88.9,81.1c-3.1,0.1-4.8-1.4-6.1-2.6c-1.1-1-1.9-1.7-3.4-1.7c-1.6,0.1-2.3,0.8-3.3,1.9
	c-1.2,1.3-2.8,3-5.9,3.1c-3.1,0.1-4.7-1.4-6.1-2.6c-1.1-1-1.9-1.7-3.4-1.7c-1.6,0.1-2.3,0.8-3.3,1.9c-1.2,1.3-2.8,2.9-5.9,3.1
	c-3.1,0.1-4.7-1.4-6.1-2.6c-1.1-1-1.9-1.7-3.4-1.7c-1.6,0.1-2.3,0.8-3.3,1.9c-1.2,1.3-2.8,3-5.9,3.1c-3.1,0.1-4.7-1.4-6.1-2.6
	c-1.1-1-1.9-1.7-3.4-1.7c-1,0-1.9-0.8-1.9-1.8c0-1,0.8-1.9,1.8-1.9c3.1-0.1,4.7,1.4,6.1,2.6c1.1,1,1.9,1.7,3.4,1.7
	c1.6-0.1,2.3-0.8,3.3-1.9c1.2-1.3,2.8-2.9,5.9-3.1c3.1-0.1,4.7,1.4,6.1,2.6c1.1,1,1.9,1.7,3.4,1.7c1.6-0.1,2.3-0.8,3.3-1.9
	c1.2-1.3,2.8-2.9,5.9-3.1c3.1-0.1,4.7,1.4,6.1,2.6c1.1,1,1.9,1.7,3.4,1.7c1.6-0.1%  

Workaround
Remove the content deposition header

Notes
Bug introduced by encoding the header MAGNOLIA-9018

https://git.magnolia-cms.com/projects/PLATFORM/repos/main/browse/magnolia-core/src/main[…]Finfo%2Fmagnolia%2Fcms%2Ffilters%2FRangeSupportFilter.java


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