Use ‘isTrustedURL’ function to validate url (#1190)

This commit is contained in:
Dean Whillier
2020-02-12 12:48:44 -05:00
committed by GitHub
parent 217947b906
commit eb66b789ba

View File

@@ -769,12 +769,8 @@ function initializeAfterAppReady() {
// get the requesting webContents url
const requestingURL = webContents.getURL();
// is the target url trusted?
const matchingTeamIndex = config.teams.findIndex((team) => {
return requestingURL.startsWith(team.url);
});
callback(matchingTeamIndex >= 0);
// is the requesting url trusted?
callback(isTrustedURL(requestingURL));
});
}