Here's a git diff:
Code: Select all
diff --git a/src/chrome.manifest b/src/chrome.manifest
index 3764fa6..4c83a9c 100644
--- a/src/chrome.manifest
+++ b/src/chrome.manifest
@@ -45,12 +45,12 @@ category profile-after-change HTTPSEverywhere @eff.org/https-everywhere;1
# XUL gets included in every non-mobile build
# Android has some non-XUL UI that is loaded from the
# sessionstore-windows-restored observer in https-everywhere.js
-overlay chrome://browser/content/browser.xul chrome://https-everywhere/content/toolbar_button.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde}
-overlay chrome://navigator/content/navigator.xul chrome://https-everywhere/content/toolbar_button.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde}
+overlay chrome://browser/content/browser.xul chrome://https-everywhere/content/toolbar_button.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde} application={8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
+overlay chrome://navigator/content/navigator.xul chrome://https-everywhere/content/toolbar_button.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde} application={8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
style chrome://global/content/customizeToolbar.xul chrome://https-everywhere/skin/https-everywhere.css
# Observatory does not yet have mobile-friendly UI
-component {0f9ab521-986d-4ad8-9c1f-6934e195c15c} components/ssl-observatory.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde}
-contract @eff.org/ssl-observatory;1 {0f9ab521-986d-4ad8-9c1f-6934e195c15c} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde}
-category profile-after-change SSLObservatory @eff.org/ssl-observatory;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde}
+component {0f9ab521-986d-4ad8-9c1f-6934e195c15c} components/ssl-observatory.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde} application={8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
+contract @eff.org/ssl-observatory;1 {0f9ab521-986d-4ad8-9c1f-6934e195c15c} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde} application={8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
+category profile-after-change SSLObservatory @eff.org/ssl-observatory;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={3550f703-e582-4d05-9a08-453d09bdfdc6} application={a79fe89b-6662-4ff4-8e88-09950ad4dfde} application={8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
diff --git a/src/chrome/content/code/HTTPS.js b/src/chrome/content/code/HTTPS.js
index e41573a..a3f126b 100644
--- a/src/chrome/content/code/HTTPS.js
+++ b/src/chrome/content/code/HTTPS.js
@@ -1,7 +1,10 @@
INCLUDE('Cookie');
-var securityService = CC['@mozilla.org/ssservice;1']
- .getService(CI.nsISiteSecurityService);
+if('@mozilla.org/ssservice;1' in CC)
+{
+ var securityService = CC['@mozilla.org/ssservice;1']
+ .getService(CI.nsISiteSecurityService);
+}
// Hack. We only need the part of the policystate that tracks content
// policy loading.
@@ -40,8 +43,16 @@ const HTTPS = {
*/
replaceChannel: function(applicable_list, channel, httpNowhereEnabled) {
var blob = HTTPSRules.rewrittenURI(applicable_list, channel.URI.clone());
- var isSTS = securityService.isSecureURI(
- CI.nsISiteSecurityService.HEADER_HSTS, channel.URI, 0);
+ if(securityService)
+ {
+ var isSTS = securityService.isSecureURI(
+ CI.nsISiteSecurityService.HEADER_HSTS, channel.URI, 0);
+ }
+ else
+ {
+ var isSTS = false;
+ }
+
if (blob === null) {
// Abort insecure requests if HTTP Nowhere is on
if (httpNowhereEnabled && channel.URI.schemeIs("http") && !isSTS) {
diff --git a/src/install.rdf b/src/install.rdf
index 5b30a5a..90ce618 100644
--- a/src/install.rdf
+++ b/src/install.rdf
@@ -17,6 +17,14 @@
<em:updateURL>https://www.eff.org/files/https-everywhere-update-2048.rdf</em:updateURL>
<em:unpack>true</em:unpack> <!-- Required for Firefox 4 -->
<em:updateKey>MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6MR8W/galdxnpGqBsYbqOzQb2eyW15YFjDDEMI0ZOzt8f504obNs920lDnpPD2/KqgsfjOgw2K7xWDJIj/18xUvWPk3LDkrnokNiRkA3KOx3W6fHycKL+zID7zy+xZYBuh2fLyQtWV1VGQ45iNRp9+Zo7rH86cdfgkdnWTlNSHyTLW9NbXvyv/E12bppPcEvgCTAQXgnDVJ0/sqmeiijn9tTFh03aM+R2V/21h8aTraAS24qiPCz6gkmYGC8yr6mglcnNoYbsLNYZ69zF1XHcXPduCPdPdfLlzVlKK1/U7hkA28eG3BIAMh6uJYBRJTpiGgaGdPd7YekUB8S6cy+CQIDAQAB</em:updateKey>
+ <em:targetApplication>
+ <Description>
+ <!-- PaleMoon -->
+ <em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id>
+ <em:minVersion>25.0</em:minVersion>
+ <em:maxVersion>30.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
<!-- firefox -->
<!-- firefox -->
<em:targetApplication>
- Add PM GUID in install.rdf
- Add PM GUID in chrome.manifest
- Check if '@mozilla.org/ssservice;1' exists before trying to do stuff with it