-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for unicode domans to PhishingController
The PhishingController now supports unicode domains. Previously it supported plain ASCII domains (including punycode domains), but any domains with non-ASCII unicode characters would always be considered as safe. Tests have been added to ensure the `test` and `bypass` methods both normalize input to punycode. Note that any whitelisted unicode domains will now be ignored. We could fix this with a migration, but it's exceedingly unlikely that any unicode domains could have been whitelisted in the first place, because we only offer that ability for blocked domains. And unicode domains were never blocked. The `eth-phishing-detect` package was updated to make a pre-existing test work correctly. Previously the "should bypass a given domain" test was broken because the example unsafe domain was not blocked in the version of `eth-phishing-detect` used. It is blocked in the current version, and an assertion has been added to ensure these tests are working correctly.
- Loading branch information
Showing
4 changed files
with
91 additions
and
13 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
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