generated from MetaMask/metamask-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the page is loaded in a sub-frame, we now display a condensed warning and a link to open the page in a new tab. It is no longer possible to add a site to the safelist from an iframe. This ensures that clickjacking cannot be used to add a site to the safelist without a users knowledge or consent. The technique used was adapted from the OWASP clickjacking defense cheat sheet [1]. This technique is recommended for legacy browsers that do not support security headers. We are using this technique instead of security headers because GitHub Pages does not allow using security headers. The consequence of failure for this defense is low; all it would allow is bypassing our phishing warning. The page used to bypass the warning would itself remain susceptible to blocking. As such, it's unclear what advantage such a bypass would have over moving to a new domain that is not yet blocked. This low consequence of failure is the reason I am recommending the use of this "legacy browser" technique, rather than moving to an alternate hosting platform that supports modern security headers. This technique appears to work in all browsers, and that's good enough for now. We can move to an alternative hosting platform that supports security headers at a later date if necessary. [1]: https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_Defense_Cheat_Sheet.html#best-for-now-legacy-browser-frame-breaking-script
- Loading branch information
Showing
4 changed files
with
75 additions
and
14 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