-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
fix: remove newline sign from email subject #2576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 👍
I would suggest that we rather trim all subjects in the EmailSubject
functions, because this is something users (and tools) might get wrong regularly (e.g. prettier ensures files end with a newline).
Codecov Report
@@ Coverage Diff @@
## master #2576 +/- ##
==========================================
+ Coverage 76.59% 76.62% +0.02%
==========================================
Files 321 321
Lines 17961 17961
==========================================
+ Hits 13758 13762 +4
+ Misses 3252 3249 -3
+ Partials 951 950 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you! 🎉 Your contribution makes Ory better :)
Hello @mszekiel |
Removed empty lines in
email.subject.gotmpl
and removed.trim()
in tests, which prevented from spotting that bug.Related issue(s)
Fixes #2491
Checklist
If this pull request addresses a security. vulnerability,
I confirm that I got green light (please contact security@ory.sh) from the maintainers to push the changes.
Further Comments
I also considered that we could use the
trim()
inEmailSubject
/LoadText
functions, but then also the same is being used for body, so not sure if this could break more. For now, this PR is the simplest solution.