Skip to content

Commit

Permalink
chore: Add links to company websites for breach resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
flozia committed Mar 31, 2023
1 parent b3efc7e commit fdac319
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions locales/en/breaches.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ breach-checklist-link-mozilla-vpn = { -brand-mozilla-vpn }
## Prompts the user for changes when there is a breach detected of password

# { $breachedCompanyLink } will link to the website of the company where the breach occurred
breach-checklist-pw-header-2 = Go to the company’s website to change your password and enable two-factor authentication (2FA).
breach-checklist-pw-header-3 = Go to { $breachedCompanyLink } to change your password and enable two-factor authentication (2FA).
# Variables:
# $passwordManagerLink (string) - a link to the password manager documentation, with { -breach-checklist-link-password-manager } as the label
breach-checklist-pw-body-2 = Make sure your password is unique and hard to guess. If this password is used on any other accounts, be sure to change it there too. { $passwordManagerLink } can help you securely keep track of all of your passwords.
Expand Down Expand Up @@ -136,7 +136,7 @@ breach-checklist-phone-header-2 = Protect your phone number with a masking servi
## Prompts the user for changes when there is a breach detected of security questions

# { $breachedCompanyLink } will link to the website of the company where the breach occurred
breach-checklist-sq-header-2 = Update your security questions on the company’s website.
breach-checklist-sq-header-3 = Update your security questions on { $breachedCompanyLink }.
breach-checklist-sq-body = Use long, random answers, and store them somewhere safe. Do this anywhere else you’ve used the same security questions.
## Prompts the user for changes when there is a breach detected of historical password
Expand Down
5 changes: 3 additions & 2 deletions src/utils/breach-resolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const BreachDataTypes = {
const breachResolutionDataTypes = {
[BreachDataTypes.Passwords]: {
priority: 1,
header: 'breach-checklist-pw-header-2',
header: 'breach-checklist-pw-header-3',
body: 'breach-checklist-pw-body-2'
},
[BreachDataTypes.Email]: {
Expand Down Expand Up @@ -85,7 +85,7 @@ const breachResolutionDataTypes = {
},
[BreachDataTypes.SecurityQuestions]: {
priority: 11,
header: 'breach-checklist-sq-header-2',
header: 'breach-checklist-sq-header-3',
body: 'breach-checklist-sq-body'
},
[BreachDataTypes.HistoricalPasswords]: {
Expand Down Expand Up @@ -114,6 +114,7 @@ function appendBreachResolutionChecklist (userBreachData, options = {}) {
const dataClasses = b.DataClasses
const args = {
companyName: b.Name,
breachedCompanyLink: `<a href="https://${b.Domain}" target="_blank">${b.Domain}</a>`,
firefoxRelayLink: `<a href="https://relay.firefox.com/?utm_medium=mozilla-websites&utm_source=monitor&utm_campaign=&utm_content=breach-resolution" target="_blank">${getMessage('breach-checklist-link-firefox-relay')}</a>`,
passwordManagerLink: `<a href="https://www.mozilla.org/firefox/features/password-manager/?utm_medium=mozilla-websites&utm_source=monitor&utm_campaign=&utm_content=breach-resolution" target="_blank">${getMessage('breach-checklist-link-password-manager')}</a>`,
mozillaVpnLink: `<a href="https://www.mozilla.org/products/vpn/?utm_medium=mozilla-websites&utm_source=monitor&utm_campaign=&utm_content=breach-resolution" target="_blank">${getMessage('breach-checklist-link-mozilla-vpn')}</a>`,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/breach-resolution.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test('appendBreachResolutionChecklist: two data classes', t => {
appendBreachResolutionChecklist(userBreachData)
t.truthy(userBreachData.verifiedEmails[0].breaches[0].breachChecklist)
t.is(userBreachData.verifiedEmails[0].breaches[0].breachChecklist[BreachDataTypes.Passwords].header,
'Go to the company’s website to change your password and enable two-factor authentication (2FA).')
'Go to <a href="https://companyName.com" target="_blank">companyName.com</a> to change your password and enable two-factor authentication (2FA).')
t.is(userBreachData.verifiedEmails[0].breaches[0].breachChecklist[BreachDataTypes.Passwords].priority, 1)
})

Expand Down

0 comments on commit fdac319

Please sign in to comment.