Skip to content

Commit

Permalink
fix mozilla#2117: match code to new Firefox alert policy
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed May 5, 2021
1 parent 7f45f51 commit 85a48a0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scripts/updatebreaches.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ const HIBP = require("../hibp");
const RemoteSettings = require("../lib/remote-settings");


const SKIP_LIST = [
"factual.com",
];

if (
!AppConstants.FX_REMOTE_SETTINGS_WRITER_USER ||
!AppConstants.FX_REMOTE_SETTINGS_WRITER_PASS ||
Expand All @@ -22,9 +18,9 @@ if (
(async () => {
const allHibpBreaches = await HIBP.req("/breaches");
const verifiedSiteBreaches = HIBP.filterBreaches(allHibpBreaches.body);
const unskippedVerifiedSiteBreaches = verifiedSiteBreaches.filter(breach => !SKIP_LIST.includes(breach.Domain));
const verifiedSiteBreachesWithPWs = verifiedSiteBreaches.filter(breach => breach.DataClasses.includes("Passwords"));

const newBreaches = await RemoteSettings.whichBreachesAreNotInRemoteSettingsYet(unskippedVerifiedSiteBreaches);
const newBreaches = await RemoteSettings.whichBreachesAreNotInRemoteSettingsYet(verifiedSiteBreachesWithPWs);

if (newBreaches.length <= 0) {
console.log("No new breaches detected.");
Expand Down

0 comments on commit 85a48a0

Please sign in to comment.