Skip to content

Commit 4f5a644

Browse files
authored
Merge branch 'master' into sysresccd.org-test
2 parents d275769 + f475346 commit 4f5a644

1,842 files changed

Lines changed: 37427 additions & 19814 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 326 additions & 5 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,18 @@ Run the latest code and rulesets in a standalone Firefox profile:
1616

1717
bash test/firefox.sh --justrun
1818

19+
Run the latest code and rulesets in a standalone profile for a specific version of Firefox:
20+
21+
FIREFOX=/path/to/firefox bash test/firefox.sh --justrun
22+
1923
Run the latest code and rulesets in a standalone Chromium profile:
2024

2125
bash test/chromium.sh --justrun
2226

27+
Run the latest code and rulesets in a standalone Tor Browser profile:
28+
29+
bash test/tor path_to_tor_browser.tar.xz
30+
2331
Build the Firefox extension as a .xpi package:
2432

2533
bash makexpi.sh
@@ -58,58 +66,9 @@ Important directories you might want to know about
5866

5967
test/ The tests live here
6068

69+
util/ Various utilities
70+
6171
Hacking on the Source Code
6272
--------------------------
6373

64-
The current stable release series is 5.2. The maintainers release new versions
65-
off the current master branch about every two weeks.
66-
67-
To submit changes, either use pull requests on GitHub or email patches to
68-
https-everywhere-rulesets@lists.eff.org (rulesets) or
69-
https-everywhere@lists.eff.org (code).
70-
71-
### Writing rulesets
72-
73-
HTTPS Everywhere consists of a large number of rules for switching sites from HTTP to HTTPS. You can read more about how to write these rules here: https://www.eff.org/https-everywhere/rulesets
74-
75-
If you want to create new rules to submit to us, we expect them to be in the src/chrome/content/rules directory. That directory also contains a useful script, make-trivial-rule, to create a simple rule for a specified domain. There is also a script called trivial-validate.py, to check all the pending rules for several common errors and oversights. For example, if you wanted to make a rule for the example.com domain, you could run
76-
77-
bash ./make-trivial-rule example.com
78-
79-
inside the rules directory. This would create Example.com.xml, which you could then take a look at and edit based on your knowledge of any specific URLs at example.com that do or don't work in HTTPS. You should then run
80-
81-
bash test.sh
82-
83-
to make sure that your rule is free of common mistakes.
84-
85-
### Writing translations
86-
87-
If you would like to help translate HTTPS Everywhere into your language,
88-
you can do that through the Tor Project's Transifex page:
89-
https://www.transifex.com/projects/p/torproject/.
90-
91-
### Bug trackers and mailing lists
92-
93-
We currently have two bug trackers. The one on GitHub (https://github.com/EFForg/https-everywhere/issues) is recommended because it gets checked more frequently and has a friendlier user interface. The one on trac.torproject.org (https://trac.torproject.org/projects/tor/report/19) has a large backlog of bugs at this point, but it has the advantage of allowing you to post bugs anonymously using the "cypherpunks" / "writecode" account. (Note that you won't see replies unless you put an email address in the CC field.)
94-
95-
We have two publicly-archived mailing lists: the https-everywhere list (https://lists.eff.org/mailman/listinfo/https-everywhere) is for discussing the project as a whole, and the https-everywhere-rulesets list (https://lists.eff.org/mailman/listinfo/https-everywhere-rules) is for discussing the rulesets and their contents, including patches and git pull requests.
96-
97-
Tests
98-
-------------
99-
100-
There are some very basic unittests under test/. These are run with
101-
102-
bash test.sh
103-
104-
Please help write more unittests and integration tests!
105-
106-
There are also ruleset tests, which aim to find broken rulesets by actually
107-
loading URLs in a browser and watching for Mixed Content Blocking to fire.
108-
The easiest way to run ruleset tests is to load a standalone Firefox instance
109-
with the tests enabled:
110-
111-
bash test/firefox.sh --justrun
112-
113-
Then click the HTTPS Everywhere icon on the toolbar, and click "Run HTTPS
114-
Everywhere Ruleset Tests." When you run the tests, be prepared to let your
115-
computer run them for a really long time.
74+
Please refer to our [contributing](CONTRIBUTING.md) document to contribute to the project.

chromium/background.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,14 @@ function onBeforeRequest(details) {
206206
uri.href = details.url;
207207

208208
// Should the request be canceled?
209-
var shouldCancel = (httpNowhereOn && uri.protocol === 'http:');
209+
var shouldCancel = (
210+
httpNowhereOn &&
211+
uri.protocol === 'http:' &&
212+
!/\.onion$/.test(uri.hostname) &&
213+
!/^localhost$/.test(uri.hostname) &&
214+
!/^127(\.[0-9]{1,3}){3}$/.test(uri.hostname) &&
215+
!/^0\.0\.0\.0$/.test(uri.hostname)
216+
);
210217

211218
// Normalise hosts such as "www.example.com."
212219
var canonical_host = uri.hostname;
@@ -241,8 +248,6 @@ function onBeforeRequest(details) {
241248
}
242249

243250
var potentiallyApplicable = all_rules.potentiallyApplicableRulesets(uri.hostname);
244-
// If no rulesets could apply, let's get out of here!
245-
if (potentiallyApplicable.size === 0) { return {cancel: shouldCancel}; }
246251

247252
if (redirectCounter[details.requestId] >= 8) {
248253
log(NOTE, "Redirect counter hit for " + canonical_url);
@@ -282,6 +287,15 @@ function onBeforeRequest(details) {
282287
}
283288

284289
if (httpNowhereOn) {
290+
// If loading a main frame, try the HTTPS version as an alternative to
291+
// failing.
292+
if (shouldCancel) {
293+
if (!newuristr) {
294+
return {redirectUrl: canonical_url.replace(/^http:/, "https:")};
295+
} else {
296+
return {redirectUrl: newuristr.replace(/^http:/, "https:")};
297+
}
298+
}
285299
if (newuristr && newuristr.substring(0, 5) === "http:") {
286300
// Abort early if we're about to redirect to HTTP in HTTP Nowhere mode
287301
return {cancel: true};

chromium/manifest.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
2-
"applications": {
3-
"gecko": {
4-
"id": "https-everywhere-eff@eff.org"
5-
}
6-
},
72
"author": {
83
"email": "eff.software.projects@gmail.com"
94
},
@@ -44,5 +39,5 @@
4439
"storage",
4540
"<all_urls>"
4641
],
47-
"version": "2016.11.8"
42+
"version": "2017.3.17"
4843
}

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You can also report the problem to the site, since they have the power to fix it
2929

3030
### [Why is HTTPS Everywhere preventing me from joining this hotel/school/other wireless network?](#why-is-https-everywhere-preventing-me-from-joining-this-hotelschoolother-wireless-network)
3131

32-
Some wireless networks hijack your HTTP connections when you first join them, in order to demand authentication or simply to try to make you agree to terms of use. HTTPS pages are protected against this type of hijacking, which is as it should be. If you go to a website that isn't protected by HTTPS Everywhere (currently, nytimes.com is one such site) that will allow your connection to be captured and redirected to the authentication or terms of use page.
32+
Some wireless networks hijack your HTTP connections when you first join them, in order to demand authentication or simply to try to make you agree to terms of use. HTTPS pages are protected against this type of hijacking, which is as it should be. If you go to a website that isn't protected by HTTPS Everywhere or by HSTS (currently, example.com is one such site), that will allow your connection to be captured and redirected to the authentication or terms of use page.
3333

3434
### [Will there be a version of HTTPS Everywhere for IE, Safari, or some other browser?](#will-there-be-a-version-of-https-everywhere-for-ie-safari-or-some-other-browser)
3535

ruleset-style.md

Lines changed: 0 additions & 125 deletions
This file was deleted.

ruleset-testing.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ target host with a left-side wildcard, and at least ten test URLs for each
3030
target host with a right-side wildcard. But this is not yet implemented.
3131

3232
# Example:
33-
<ruleset name="example.com">
34-
<target host="example.com" />
35-
<target host="*.example.com" />
36-
37-
<test url="http://www.example.com/" />
38-
<test url="http://beta.example.com/" />
39-
40-
<rule from="^http://([\w-]+\.)?example\.com/"
41-
to="https://$1example.com/" />
42-
43-
</ruleset>
44-
33+
```xml
34+
<ruleset name="example.com">
35+
<target host="example.com" />
36+
<target host="*.example.com" />
37+
38+
<test url="http://www.example.com/" />
39+
<test url="http://beta.example.com/" />
40+
41+
<rule from="^http://([\w-]+\.)?example\.com/"
42+
to="https://$1example.com/" />
43+
</ruleset>
44+
```
4545
This ruleset has one implicit test URL from a target host
4646
("http://example.com/"). The other target host has a wildcard, so creates no
4747
implicit test URL. There's a single rule. That rule contains a '+' and a '?', so

src/Changelog

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
Firefox 5.2.13 / Chrome 2017.3.17
2+
* Ruleset updates
3+
4+
Firefox 5.2.12 / Chrome 2017.3.9
5+
* Excepting loopback hostnames from 'HTTPS Nowhere' functionality
6+
* Ruleset updates
7+
8+
Firefox 5.2.11 / Chrome 2017.2.13
9+
* Ruleset updates
10+
11+
Firefox 5.2.10 / Chrome 2017.1.25
12+
* Removing targets which are HSTS preloaded in all supported browsers
13+
* Ruleset updates
14+
15+
Firefox 5.2.9 / Chrome 2016.12.19
16+
* Ruleset updates
17+
* In HTTP Nowhere mode, attempt HTTPS before block
18+
19+
Firefox 5.2.8 / Chrome 2016.11.30
20+
* Ruleset fixes
21+
122
Firefox 5.2.7 / Chrome 2016.11.8
223
* Ruleset fixes
324

0 commit comments

Comments
 (0)