-
-
Notifications
You must be signed in to change notification settings - Fork 956
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple phishing configurations (#7079)
* Support multiple phishing configurations The phishing detector has been updated to support multiple phishing configurations. Both the configuration object and the result object have been updated to accommodate the need to identify the name of the config that the checked domain matched. Since the config and return value was already being changed, the nomenclature has been updated to replace `black/white` with `block/allow` as well, which is a change we have been meaning to make for some time. This change to both the configuration and result object applies only when the new configuration format is used. The old format preserves the old config and result value, making this a non-breaking change. The old configuration accepted three lists (`blacklist`, `whitelist`, and `fuzzylist`), and a `tolerance` value for the fuzzylist match. The new configuration is an array of objects rather than an object, to accommodate multiple configurations. Each configuration option accepts three lists (`blocklist`, `allowlist`, and `fuzzylist`), `tolerance` for the fuzzylist match, and two new properties: `name` and `version`. The `version` parameter was already used by the old configuration, but it was not required or used by the detector itself. It is now required with the new configuration, and it is returned with each match. The new `name` parameter describes which configuration matched the origin being checked (if any). This was critical for us because it allows us to direct the user to the appropriate place when they want to dispute a blocked site. The return value was updated to include the `name` and `version` parameters. The `type` was updated from `blacklist` to `blocklist` and from `whitelist` to `allowlist` as well. * v1.2.0 This release adds support for multiple phishing configurations, and includes changes to the configuration object and return value if an array of configuration values is passed to the phishing detector constructor. This is a non-breaking change because the old configuration format is still supported, and the return values remain the same if the old configuration format is used. Co-authored-by: Deven Blake <[email protected]> Co-authored-by: H <[email protected]>
- Loading branch information
1 parent
59aa4c1
commit fb540b0
Showing
3 changed files
with
1,118 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fb540b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi