[MGNLREST-54] REST request with valid accept header "application/xhtml+xml" returns IllegalArgumentException Created: 13/Mar/14  Updated: 08/Jul/14  Resolved: 01/Jul/14

Status: Closed
Project: Magnolia REST Framework
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0.4

Type: Bug Priority: Major
Reporter: Johannes Selig Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File TestEndpoint.patch     Text File stacktrace.txt    
Issue Links:
causality
caused by MAGNOLIA-5717 UnicodeNormalizationRequestWrapper us... 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   

After updating Magnolia to v5.2.2, calls to the rest interface including accept header with "+" - e.g. "application/xhtml+xml" - in between failed.

Problem seems to be in UnicodeNormalizationRequestWrapper which url-decodes the request header and replaces characters.
Disabling the Unicode Normalization in the Magnolia Filter Configuration undermines the behavoir and makes our rest-interface working.

See attached stacktrace.txt for more information.



 Comments   
Comment by Philip Mundt [ 18/Mar/14 ]

Hi!

Thanks for reporting this issue.
We've created a follow-up ticket in magnolia_main MAGNOLIA-5717.

Regards
Philip

Comment by Philip Mundt [ 01/Jul/14 ]

Resolved by setting magnoliaVersion to 5.2.6-SNAPSHOT (which contains fix for UnicodeNormalizationRequestWrapper, see MAGNOLIA-5717).

Comment by Philip Mundt [ 02/Jul/14 ]

For QA: Attaching a TestEnpoint (TestEndpoint.patch) which will return "application/xhtml+xml" for test purposes. Todo:

  1. Duplicate node endpoint config and change implementationClass to info.magnolia.rest.service.TestEndpoint
  2. Adjust rest role in SecurityApp to allow access to all endpoints (just for the sake of testing)
  3. Use curl to test: curl -H "Accept: application/xhtml+xml" -v --user superuser:superuser http://localhost:8080/.rest/test/payload
  4. There should be no more IllegalArgumentException
Generated at Mon Feb 12 06:56:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.