[MGNLMAIL-190] Cannot use special characters in mail subject in 5.6.1 Created: 19/Sep/23  Updated: 14/Dec/23  Resolved: 29/Nov/23

Status: Closed
Project: Magnolia Mail Module
Component/s: None
Affects Version/s: 5.6.1
Fix Version/s: 6.0.0, 5.6.2

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Canh Nguyen
Resolution: Fixed Votes: 5
Labels: None
Σ Remaining Estimate: 0d Remaining Estimate: 0d
Σ Time Spent: 3d 1.5h Time Spent: 3d 1.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File example-mail-with-umlaut.png    
Issue Links:
Problem/Incident
causality
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLMAIL-191 Implement Sub-task Completed Canh Nguyen  
MGNLMAIL-192 Review Sub-task Completed Rishab Dhar  
MGNLMAIL-193 piQA Sub-task Completed Rishab Dhar  
MGNLMAIL-194 QA Sub-task Closed Anh Vu  
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
Release notes required:
Yes
Date of First Response:
Epic Link: Support
Sprint: DevX 51
Story Points: 2
Team: DeveloperX
Work Started:
Approved:
Yes

 Description   

Trying to use any special characters in the subject of an email sent by Magnolia doesn't work. The characters are converted to unicode.

Reproduce

  • Make sure the user you are signed in with has an email address in their profile.
    • Can be set in the Security app.
    • Can be set in the user settings menu (top right corner).
  • Make sure you have your email password set in the Passwords app.
  • If using your Magnolia google account turn on less secure apps.
  • Change this template to have an umlaut /modules/mail/config/templatesConfiguration/simpleConfiguration@subject
    • For example: This is a test ü mail.
  • Open the Mail app and setup the parameter to send a mail with smtp.
    • For Google:
      • Server: smtp.gmail.com
      • Port: 465
      • Security: SSL
  • Switch to the "Verify Setup" tab and send a test mail using the "Simple Configuration" template.
  • Check your mailbox to see the issue with the subject line.

Expected
The email subject should be --> This is a test ü mail.

Actual
This is a test \u00FC mail.

Notes

The issue is caused by sanitize-method in MgnlEmail class. Subject text must not be processed by StringEscapeUtils.escapeJava(userInput)-method!
(Processing subject input with escapeJava-method does also lead to Java-escape characters in subject, e.g. "\" gets "
")



 Comments   
Comment by Marvin Kerkhoff [ 10/Nov/23 ]

We also found this issue in 3 different Customer Projects since Version 5.6.1 version of this module. It was fine at 5.6

We see this also for all Umlaut which are special characters as well.

I am happy to see progress here. ;D

Comment by Manuel Haug [ 14/Nov/23 ]

We also found this issue in a customer project. Is there any ETA on when this is going to be solved?

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