-
-
Notifications
You must be signed in to change notification settings - Fork 372
Description
Describe the bug
With a blog names "A, B, C et D", I opened email subscription. The field appears to visitors, but when they try to subscribe to the blog, they get a server error in the Web UI, and the error logs state:
Jan 01 20:41:56 writefreely[2662297]: ERROR: 2026/01/01 20:41:56 mailer.go:166: Unable to send email to <[email protected]>: Mail Error: mail: missing '@' or angle-addr; Header: [From] Address: [A, B, C et D <[email protected]>]
Jan 01 20:41:56 writefreely[2662297]: ERROR: 2026/01/01 20:41:56 email.go:155: Failed to send subscription confirmation email: Mail Error: mail: missing '@' or angle-addr; Header: [From] Address: [A, B, C et D <[email protected]>]
I believe this is because the RFC does not allow commas in the e-mail sender name, and WriteFreely gets confused, expecting several recipients when constructing the email.
To solve this, I believe it should be good if WriteFreely puts double-quotes around the blog name (or sanitizes the name).
Steps to reproduce (if necessary)
Steps to reproduce the behavior:
- Name a blog "A, B, C et D"
- In the "Customize blog", tick to allow e-mail subscriptions
- Visit the blog and subscribe
- You get a "server error" page in the WebUI and the arror message above is logged
- As a result, no e-mail is sent, so link cannot be confirmed and subscription is not validated.
Expected behavior
Subscription should be successful and no error in logs.
Application configuration
- Multi-user mode
- Database [mysql]
- Open registration [yes]
- Federation enabled [yes]
- SMTP e-mail configured
Version or last commit:
v0.16.0