mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Fixed truncated URL for password reset email (#11827)
no issue - shows the full URL instead of a truncated link in password reset email body. This is required for security and usability reasons (copy/paste)
This commit is contained in:
parent
1f5b031bfa
commit
c2470bcddb
@ -123,12 +123,10 @@ async function sendResetNotification(data, mailAPI) {
|
||||
const adminUrl = urlUtils.urlFor('admin', true);
|
||||
const resetToken = security.url.encodeBase64(data.resetToken);
|
||||
const resetUrl = urlUtils.urlJoin(adminUrl, 'reset', resetToken, '/');
|
||||
const resetLink = urlUtils.urlJoin(adminUrl, 'reset', `${resetToken.slice(0, 5)}...`);
|
||||
|
||||
const content = await mail.utils.generateContent({
|
||||
data: {
|
||||
resetUrl,
|
||||
resetLink
|
||||
resetUrl
|
||||
},
|
||||
template: 'reset-password'
|
||||
});
|
||||
|
@ -23,7 +23,7 @@
|
||||
<!-- START OF EMAIL CONTENT -->
|
||||
<p style="color: #808284; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><strong>Hey there!</strong></p>
|
||||
<p style="color: #808284; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">You can use this link to create a new password for your account on <strong>{{siteTitle}}</strong>:</p>
|
||||
<p style="color: #808284; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><a href="{{resetUrl}}" style="color: #5ba4e5;">{{resetLink}}</a></p>
|
||||
<p style="color: #808284; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0; word-break: break-all;"><a href="{{resetUrl}}" style="color: #5ba4e5;">{{resetUrl}}</a></p>
|
||||
<p style="color: #808284; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">If you have any trouble, you should contact your site administrator for help.</p>
|
||||
<!-- END OF EMAIL CONTENT -->
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user