mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: urlencode email in reset password link (#15167)
Fixes https://github.com/coder/coder/issues/15151 This runs `urlencode` (provided by `text/template`) on the email address in the link. This ensures the link will work if a user has an email in the form `user+label@example.com`.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
UPDATE notification_templates
|
||||
SET
|
||||
title_template = E'Reset your password for Coder',
|
||||
body_template = E'Hi {{.UserName}},\n\nUse the link below to reset your password.\n\nIf you did not make this request, you can ignore this message.',
|
||||
actions = '[{
|
||||
"label": "Reset password",
|
||||
"url": "{{base_url}}/reset-password/change?otp={{.Labels.one_time_passcode}}&email={{.UserEmail | urlquery}}"
|
||||
}]'::jsonb
|
||||
WHERE
|
||||
id = '62f86a30-2330-4b61-a26d-311ff3b608cf'
|
||||
Reference in New Issue
Block a user