diff options
author | hackademix | 2019-10-27 21:33:21 +0000 |
---|---|---|
committer | hackademix | 2019-10-27 22:05:35 +0000 |
commit | ad5f6b1786ad1dc09b88ed9eef9cd558d726a665 (patch) | |
tree | db9e16aa3b6521049522121cfb358200e88775f4 /src/common | |
parent | b1733d439298e81eefb38b3dc250dcae6f90a6e1 (diff) | |
download | noscript-ad5f6b1786ad1dc09b88ed9eef9cd558d726a665.tar.gz noscript-ad5f6b1786ad1dc09b88ed9eef9cd558d726a665.tar.xz noscript-ad5f6b1786ad1dc09b88ed9eef9cd558d726a665.zip |
[Tor] Treat .onion sites whose protocol is HTTP as if it was HTTPS.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/Policy.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/Policy.js b/src/common/Policy.js index 401b19f..e7818d9 100644 --- a/src/common/Policy.js +++ b/src/common/Policy.js @@ -65,6 +65,9 @@ var {Permissions, Policy, Sites} = (() => { } } if (url) { + if (Sites.onionSecure && url.protocol === "http:" && url.hostname.endsWith(".onion")) { + url.protocol = "https:"; + } let path = url.pathname; siteKey = url.origin; if (siteKey === "null") { |