Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions src/chrome/content/rules/Fastly.net.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!--
For other Fastly coverage, see Fastly.xml.


Nonfunctional domains:

- *.global.prod.fastly.net
Expand All @@ -25,24 +24,32 @@
<ruleset name="Fastly.net (partial)">

<target host="*.fastly.net" />
<exclusion pattern="^http://(?:(?!assets1\.fastly\.com\.a\.prod\.).+\.prod|purge)\.fastly\.net/" />

<!-- https://github.com/EFForg/https-everywhere/issues/1597

These fonts are used for icons (presumably via chars assigned
to private use?). Securing said fonts causes CORS denials.
-->
<exclusion pattern="^http://boingboing\.global\.ssl\.fastly\.net/assets/[\w-]+\.(?:tt|wof)f" />

<!-- +ve:
-->
<test url="http://boingboing.global.ssl.fastly.net/assets/fontawesome-webfont-743c128c2e48ae20145724e61f9998b4.ttf?http://bbs.boingboing.net" />
<test url="http://boingboing.global.ssl.fastly.net/assets/fontawesome-webfont-eeaf3e983ade434b10eda37dfbd6c6d7.woff?http://bbs.boingboing.net" />
<test url="http://boingboing.global.ssl.fastly.net/assets/fontawesome-webfont-eeaf3e983ade434b10eda37dfbd6c6d7.woff?http://bbs.boingboing.net&amp;v=" />

<test url="http://swiftype-proxy-fastly.a.ssl.fastly.net/embed.js" />
<test url="http://virtual-host-discourse.global.ssl.fastly.net" />
<test url="http://naytev.global.ssl.fastly.net/" />

<exclusion pattern="^http://(?!assets1\.fastly\.com\.a\.prod\.)[\w.-]+\.prod\.fastly\.net/" />
<test url="http://www.example.com.global.prod.fastly.net/" />
<test url="http://www.loveholidays.com.global.prod.fastly.net/" />
<test url="http://www.cosmopolitan.com.global.prod.fastly.net/" />
<exclusion pattern="^http://purge\.fastly\.net/" />
<test url="http://purge.fastly.net/" />
<!-- Discourse forum software uses a font for its icons. When the HTTP URL
for these fonts gets upgraded, it triggers the CORS bug,
https://github.com/EFForg/https-everywhere/issues/49.
This caused problems on rust-lang.org and Boing Boing:
https://github.com/EFForg/https-everywhere/issues/1365
https://github.com/EFForg/https-everywhere/issues/1597
The paths have a predictable pattern so we can exclude all instances even though they exist on different hostnames.
-->
<exclusion pattern="^http://[\w.-]+/assets/fontawesome-webfont-" />
<test url="http://boingboing.global.ssl.fastly.net/assets/fontawesome-webfont-eeaf3e983ade434b10eda37dfbd6c6d7.woff?http://bbs.boingboing.net&amp;amp;2&amp;v=4.3.0" />
<test url="http://virtual-host-discourse.global.ssl.fastly.net/assets/fontawesome-webfont-73827efc2a64a873027d05873d392cb6.eot?http://users.rust-lang.org&amp;amp;2&amp;v=4.3.0" />
<test url="http://boingboing.global.ssl.fastly.net/assets/fontawesome-webfont-743c128c2e48ae20145724e61f9998b4.ttf?http://bbs.boingboing.net" />

<rule from="^http://assets1\.fastly\.com\.a\.prod\.fastly\.net/"
to="https://fastly.a.ssl.fastly.net/" />
<test url="http://assets1.fastly.com.a.prod.fastly.net/" />

<rule from="^http:"
to="https:" />
Expand Down
3 changes: 2 additions & 1 deletion src/chrome/content/rules/Mozilla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@

https://mail1.eff.org/pipermail/https-everywhere-rules/2013-June/001635.html
-->
<exclusion pattern="^http://(?:bonsai|browserquest|trychooser\.pub\.build|(?!image)\w+\.e|graphs|krakenbenchmark|mig|releases|sfx-images|alerts\.telemetry|w(?:ebsite|ww)-archive)\.mozilla\.org/" />
<exclusion pattern="^http://(?:europe|bonsai|browserquest|trychooser\.pub\.build|(?!image)\w+\.e|graphs|krakenbenchmark|mig|releases|sfx-images|alerts\.telemetry|w(?:ebsite|ww)-archive)\.mozilla\.org/" />

<test url="http://bonsai.mozilla.org/" />
<test url="http://browserquest.mozilla.org/" />
Expand All @@ -253,6 +253,7 @@
<test url="http://careers.mozilla.org/" />
<test url="http://developer.mozilla.org/" />
<test url="http://dxr.mozilla.org/" />
<test url="http://europe.mozilla.org/" />
<test url="http://ftp.mozilla.org/" />
<test url="http://git.mozilla.org/" />
<test url="http://hg.mozilla.org/" />
Expand Down
5 changes: 4 additions & 1 deletion src/chrome/content/rules/Next.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<ruleset name="Next">
<!--
Disabled per https://trac.torproject.org/projects/tor/ticket/15445
-->
<ruleset name="Next" default_off="Breaks cart">
<target host="next.co.uk" />
<target host="www.next.co.uk" />

Expand Down
2 changes: 1 addition & 1 deletion src/components/https-everywhere.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ HTTPSEverywhere.prototype = {
.getInterface(Ci.nsIDOMWindow);
// this is the gBrowser object of the firefox window this tab is in
var gBrowser = aDOMWindow.gBrowser;
if (gBrowser) {
if (gBrowser && gBrowser._getTabForContentWindow) {
var aTab = gBrowser._getTabForContentWindow(contentWindow.top);
// this is the clickable tab xul element, the one found in the tab strip
// of the firefox window, aTab.linkedBrowser is same as browser var above
Expand Down