Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper encoding for email headers #1147

Open
pyte1 opened this issue Aug 29, 2023 · 0 comments
Open

Proper encoding for email headers #1147

pyte1 opened this issue Aug 29, 2023 · 0 comments

Comments

@pyte1
Copy link

pyte1 commented Aug 29, 2023

Hi,

we found a issue with the way fider handels encoding in mail headers. In our testings we used the Invitations feature to test this.

Steps to reproduce:

  • Send invitaion to User
  • Use non-ASCII characters in the "Subject" field
  • Send the invite

After sending a test invite with the subject "Test ä ö ü", i've checked the mail on our test server (Postfix/Dovecot/rspamd/amavis). Here is an example:

Subject: [Fider] ÖoorwerASD Ääööas
MIME-version: 1.0
Content-Type: text/html; charset="UTF-8"

Which is fine, as it gets displayed correctly when viewed directly on the mail server. However this is not according to spec. Subjects with non-ASCII characters should be encoded as described in RFC 1342 e.g. =?charset?encoding?encoded-text?=

Although fider uses SMTPUTF8 if the server prodivdes it this is not an option for most people. SMTPUTF8 is not supported in some software, and can lead to issues with downstream SMTP Servers that don't support it.

Is there a way you could implement a Subject encoding like this as described here:

func cSubject(subject string) string {
    return "=?utf-8?q?" + subject + "?="
}

Some further information can be found here.

Any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant