-
Notifications
You must be signed in to change notification settings - Fork 235
Prevent sites from using external links like mailto. #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
0386bf3
2ab54f2
b811530
6418cb1
d7ff4ec
97bfed7
c835b38
15ece0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -270,6 +270,53 @@ user_pref("general.buildID.override", "20100101"); | |
| // https://github.com/pyllyukko/user.js/issues/120 | ||
| user_pref("browser.display.use_document_fonts", 0); | ||
|
|
||
| // PREF: Prevent sites from using links like mailto to launch external applications. | ||
| // http://kb.mozillazine.org/Network.protocol-handler.external-default | ||
| // http://kb.mozillazine.org/Network.protocol-handler.warn-external-default | ||
| // https://news.ycombinator.com/item?id=13047883 | ||
| // https://bugzilla.mozilla.org/show_bug.cgi?id=167475 | ||
| // NOTICE: Breaks mailto links on legit websites, user has to right-click and copy mail address from the link. | ||
|
||
| // TODO: Add externally-handled protocols from Windows 8.1 and Windows 10 (currently contains protocols only from Linux and Windows 7) that might pose a similar threat (see e.g. https://news.ycombinator.com/item?id=13044991) | ||
| // TODO: Add externally-handled protocols from Mac OS X that might pose a similar threat (see e.g. https://news.ycombinator.com/item?id=13044991) | ||
| user_pref("network.protocol-handler.external-default", false); | ||
| user_pref("network.protocol-handler.external.irc", false); | ||
| user_pref("network.protocol-handler.external.magnet", false); | ||
| user_pref("network.protocol-handler.external.mailto", false); | ||
| user_pref("network.protocol-handler.external.ms-windows-store", false); | ||
| user_pref("network.protocol-handler.external.news", false); | ||
| user_pref("network.protocol-handler.external.nntp", false); | ||
| user_pref("network.protocol-handler.external.sftp", false); | ||
| user_pref("network.protocol-handler.external.snews", false); | ||
| user_pref("network.protocol-handler.warn-external-default", true); | ||
| user_pref("network.protocol-handler.warn-external.irc", true); | ||
| user_pref("network.protocol-handler.warn-external.magnet", true); | ||
| user_pref("network.protocol-handler.warn-external.mailto", true); | ||
| user_pref("network.protocol-handler.warn-external.ms-windows-store", true); | ||
| user_pref("network.protocol-handler.warn-external.news", true); | ||
| user_pref("network.protocol-handler.warn-external.nntp", true); | ||
| user_pref("network.protocol-handler.warn-external.sftp", true); | ||
| user_pref("network.protocol-handler.warn-external.sms", true); | ||
| user_pref("network.protocol-handler.warn-external.snews", true); | ||
| user_pref("network.protocol-handler.warn-external.tel", true); | ||
| user_pref("network.protocol-handler.warn-external.vnd.youtube", true); | ||
|
|
||
| // PREF: Disable nonessential protocols from being used altogether. | ||
| // http://kb.mozillazine.org/Network.protocol-handler.expose.%28protocol%29 | ||
| // NOTICE: Breaks all interactions and links using these protocols. | ||
|
||
| // TODO: Add more protocols, see TODO for the previous PREF. | ||
| // network.protocol-handler.expose-all == false breaks some javascript links, hence not used. | ||
| user_pref("network.protocol-handler.expose.irc", false); | ||
| user_pref("network.protocol-handler.expose.magnet", false); | ||
| user_pref("network.protocol-handler.expose.mailto", false); | ||
| user_pref("network.protocol-handler.expose.ms-windows-store", false); | ||
| user_pref("network.protocol-handler.expose.news", false); | ||
| user_pref("network.protocol-handler.expose.nntp", false); | ||
| user_pref("network.protocol-handler.expose.sftp", false); | ||
| user_pref("network.protocol-handler.expose.sms", false); | ||
| user_pref("network.protocol-handler.expose.snews", false); | ||
| user_pref("network.protocol-handler.expose.tel", false); | ||
| user_pref("network.protocol-handler.expose.vnd.youtube", false); | ||
|
|
||
| /****************************************************************************** | ||
| * SECTION: Extensions / plugins * | ||
| ******************************************************************************/ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Should be
// PREF: Prevent sites from using URLs such as mailto:, irc:, magnet: ... to launch external applicationsThere 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.
Thanks for the wording suggestions.