feat(mailer): Remove the account lockout feature. (#187) r=vladikoff
With signin confirmation and email recaphta we have more targeted meant to keep bad people at bay while minimizing friction for valid users, account lockout no longer seems particularly elegant. fixes #186
This commit is contained in:
Родитель
a63ca05821
Коммит
f91a3279e2
|
@ -154,11 +154,6 @@ var conf = convict({
|
|||
format: String,
|
||||
default: undefined
|
||||
},
|
||||
accountUnlockUrl: {
|
||||
doc: 'Deprecated. uses contentServer.url',
|
||||
format: String,
|
||||
default: undefined
|
||||
},
|
||||
initiatePasswordResetUrl: {
|
||||
doc: 'Deprecated. uses contentServer.url',
|
||||
format: String,
|
||||
|
@ -214,7 +209,6 @@ var contentServerUrl = conf.get('contentServer.url')
|
|||
conf.set('mail.signInUrl', contentServerUrl + '/signin')
|
||||
conf.set('mail.verificationUrl', contentServerUrl + '/v1/verify_email')
|
||||
conf.set('mail.passwordResetUrl', contentServerUrl + '/v1/complete_reset_password')
|
||||
conf.set('mail.accountUnlockUrl', contentServerUrl + '/v1/complete_unlock_account')
|
||||
conf.set('mail.initiatePasswordResetUrl', contentServerUrl + '/reset_password')
|
||||
conf.set('mail.initiatePasswordChangeUrl', contentServerUrl + '/settings/change_password')
|
||||
conf.set('mail.verifyLoginUrl', contentServerUrl + '/complete_signin')
|
||||
|
|
33
mailer.js
33
mailer.js
|
@ -48,7 +48,6 @@ module.exports = function (log) {
|
|||
this.initiatePasswordResetUrl = config.initiatePasswordResetUrl
|
||||
this.initiatePasswordChangeUrl = config.initiatePasswordChangeUrl
|
||||
this.passwordResetUrl = config.passwordResetUrl
|
||||
this.accountUnlockUrl = config.accountUnlockUrl
|
||||
this.syncUrl = config.syncUrl
|
||||
this.androidUrl = config.androidUrl
|
||||
this.iosUrl = config.iosUrl
|
||||
|
@ -263,38 +262,6 @@ module.exports = function (log) {
|
|||
})
|
||||
}
|
||||
|
||||
Mailer.prototype.unlockEmail = function (message) {
|
||||
var query = {
|
||||
uid: message.uid,
|
||||
code: message.code
|
||||
}
|
||||
if (message.service) { query.service = message.service }
|
||||
if (message.redirectTo) { query.redirectTo = message.redirectTo }
|
||||
if (message.resume) { query.resume = message.resume }
|
||||
|
||||
var link = this.accountUnlockUrl + '?' + qs.stringify(query)
|
||||
|
||||
return this.send({
|
||||
acceptLanguage: message.acceptLanguage,
|
||||
email: message.email,
|
||||
headers: {
|
||||
'X-Link': link,
|
||||
'X-Service-ID': message.service,
|
||||
'X-Uid': message.uid,
|
||||
'X-Unlock-Code': message.code
|
||||
},
|
||||
subject: gettext('Re-verify your Firefox Account'),
|
||||
template: 'unlockEmail',
|
||||
templateValues: {
|
||||
email: message.email,
|
||||
link: link,
|
||||
supportUrl: this.supportUrl,
|
||||
supportLinkAttributes: this._supportLinkAttributes()
|
||||
},
|
||||
uid: message.uid
|
||||
})
|
||||
}
|
||||
|
||||
Mailer.prototype.passwordChangedEmail = function (message) {
|
||||
var link = this.createPasswordResetLink(message.email)
|
||||
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<% extends "partials/base/base.html" %>
|
||||
|
||||
<% block content %>
|
||||
<!--Header Area-->
|
||||
<tr style="page-break-before: always">
|
||||
<td valign="top">
|
||||
<h1 style="font-family: sans-serif; font-weight: normal; margin: 0 0 24px 0; text-align: center;">{{t "Account activity notice"}}</h1>
|
||||
<p class="primary" style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0 0 24px 0; text-align: center;">{{t "For security reasons your Firefox Account was put on lockdown. To perform account-level activities, please click the link to re-verify your account now." }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--Button Area-->
|
||||
<tr height="50">
|
||||
<td align="center" valign="top">
|
||||
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="email-button" style="-webkit-text-size-adjust: 100%; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #0996f8; border-radius: 4px; height: 50px; width: 310px !important;">
|
||||
<tr style="page-break-before: always">
|
||||
<td align="center" valign="middle" id="button-content" style="font-family: sans-serif; font-weight: normal; text-align: center; margin: 0; color: #ffffff; font-size: 20px; line-height: 100%;">
|
||||
<!--[if mso]>
|
||||
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="{{{link}}}" style="width:280px;height:40px;v-text-anchor:middle;" arcsize="10%" stroke="f" fillcolor="#0996f8">
|
||||
<w:anchorlock/>
|
||||
<center>
|
||||
<![endif]-->
|
||||
<a href="{{{link}}}" id="button-link" style="font-family:sans-serif; color: #fff; display: block; padding: 15px; text-decoration: none; width: 280px;">{{t "Verify account"}}</a>
|
||||
<!--[if mso]>
|
||||
</center>
|
||||
</v:roundrect>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!--Button Area-->
|
||||
<tr style="page-break-before: always">
|
||||
<td border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
|
||||
<br/>
|
||||
<p width="310" class="secondary" style="font-family: sans-serif; font-weight: normal; margin: 0 0 12px 0; text-align: center; color: #8A9BA8; font-size: 11px; line-height: 13px; width: 310px !important; word-wrap: break-word">{{t "Alternatively:"}}<a href="{{{link}}}" style="color: #0996f8; text-decoration: none; width: 310px !important; display:block;"><br/>{{{link}}}</a></p>
|
||||
<p class="secondary" style="font-family: sans-serif; font-weight: normal; margin: 0 0 12px 0; text-align: center; color: #8A9BA8; font-size: 11px; line-height: 13px; width: 310px !important; word-wrap:break-word">{{t "This is an automated email; if you received it in error, no action is required."}} {{{t "For more information, please visit <a %(supportLinkAttributes)s>Mozilla Support</a>."}}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<% endblock %>
|
|
@ -55,7 +55,6 @@ module.exports = function () {
|
|||
'post_verify',
|
||||
'reset',
|
||||
'suspicious_location',
|
||||
'unlock',
|
||||
'verification_reminder_first',
|
||||
'verification_reminder_second',
|
||||
'verify',
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>{{t "Firefox Accounts"}}</title>
|
||||
</head>
|
||||
|
||||
<body style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0; padding: 0;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" width="310" style="-webkit-text-size-adjust: 100%; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 310px; margin: 0 auto;">
|
||||
|
||||
<!--Logo-->
|
||||
<tr style="page-break-before: always">
|
||||
<td align="center" id="firefox-logo" style="padding: 20px 0;">
|
||||
<img src="http://image.e.mozilla.org/lib/fe9915707361037e75/m/2/fxlogojg.gif" height="95" width="88" alt="" style="-ms-interpolation-mode: bicubic;" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!--Header Area-->
|
||||
<tr style="page-break-before: always">
|
||||
<td valign="top">
|
||||
<h1 style="font-family: sans-serif; font-weight: normal; margin: 0 0 24px 0; text-align: center;">{{t "Account activity notice"}}</h1>
|
||||
<p class="primary" style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0 0 24px 0; text-align: center;">{{t "For security reasons your Firefox Account was put on lockdown. To perform account-level activities, please click the link to re-verify your account now." }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--Button Area-->
|
||||
<tr height="50">
|
||||
<td align="center" valign="top">
|
||||
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="email-button" style="-webkit-text-size-adjust: 100%; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #0996f8; border-radius: 4px; height: 50px; width: 310px !important;">
|
||||
<tr style="page-break-before: always">
|
||||
<td align="center" valign="middle" id="button-content" style="font-family: sans-serif; font-weight: normal; text-align: center; margin: 0; color: #ffffff; font-size: 20px; line-height: 100%;">
|
||||
<!--[if mso]>
|
||||
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="{{{link}}}" style="width:280px;height:40px;v-text-anchor:middle;" arcsize="10%" stroke="f" fillcolor="#0996f8">
|
||||
<w:anchorlock/>
|
||||
<center>
|
||||
<![endif]-->
|
||||
<a href="{{{link}}}" id="button-link" style="font-family:sans-serif; color: #fff; display: block; padding: 15px; text-decoration: none; width: 280px;">{{t "Verify account"}}</a>
|
||||
<!--[if mso]>
|
||||
</center>
|
||||
</v:roundrect>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!--Button Area-->
|
||||
<tr style="page-break-before: always">
|
||||
<td border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
|
||||
<br/>
|
||||
<p width="310" class="secondary" style="font-family: sans-serif; font-weight: normal; margin: 0 0 12px 0; text-align: center; color: #8A9BA8; font-size: 11px; line-height: 13px; width: 310px !important; word-wrap: break-word">{{t "Alternatively:"}}<a href="{{{link}}}" style="color: #0996f8; text-decoration: none; width: 310px !important; display:block;"><br/>{{{link}}}</a></p>
|
||||
<p class="secondary" style="font-family: sans-serif; font-weight: normal; margin: 0 0 12px 0; text-align: center; color: #8A9BA8; font-size: 11px; line-height: 13px; width: 310px !important; word-wrap:break-word">{{t "This is an automated email; if you received it in error, no action is required."}} {{{t "For more information, please visit <a %(supportLinkAttributes)s>Mozilla Support</a>."}}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr style="page-break-before: always">
|
||||
<td valign="top">
|
||||
<p style="font-family: sans-serif; font-weight: normal; margin: 0; text-align: center; color: #8A9BA8; font-size: 11px; line-height: 13px; width: 310px !important; word-wrap:break-word">Mozilla. 331 E Evelyn Ave, Mountain View, CA 94041
|
||||
<br />
|
||||
<a href="https://www.mozilla.org/privacy" style="color: #0996f8; text-decoration: none; font-family: sans-serif;">{{t "Mozilla Privacy Policy" }}</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
{{t "For security reasons your Firefox Account was put on lockdown. To perform account-level activities, please click the link to re-verify your account now." }}
|
||||
{{t "Verify account:"}} {{{link}}}
|
||||
|
||||
{{t "This is an automated email; if you received it in error, no action is required."}} {{t "For more information, please visit %(supportUrl)s"}}
|
||||
|
||||
Mozilla. 331 E Evelyn Ave, Mountain View, CA 94041
|
||||
{{t "Mozilla Privacy Policy" }} https://www.mozilla.org/privacy
|
|
@ -23,7 +23,6 @@ var messageTypes = [
|
|||
'postVerifyEmail',
|
||||
'recoveryEmail',
|
||||
'suspiciousLocationEmail',
|
||||
'unlockEmail',
|
||||
'verificationReminderEmail',
|
||||
'verifyEmail',
|
||||
'verifyLoginEmail'
|
||||
|
@ -35,7 +34,6 @@ var typesContainSupportLinks = [
|
|||
'passwordResetEmail',
|
||||
'postVerifyEmail',
|
||||
'recoveryEmail',
|
||||
'unlockEmail',
|
||||
'verificationReminderEmail',
|
||||
'verifyEmail'
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче