Skip to content

Commit cec8566

Browse files
committed
Check scheme before attempting to rewrite.
This avoids "uri.host is explosive" errors in the logs on URIs like about:startpage. This check already happens in https-everywhere.js before calling replaceChannel, but this other path into rewrittenURI wasn't checked previously.
1 parent 31e70c9 commit cec8566

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/chrome/content/code/ApplicableList.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ ApplicableList.prototype = {
7373
populate_list: function() {
7474
// The base URI of the dom tends to be loaded from some /other/
7575
// ApplicableList, so pretend we're loading it from here.
76-
HTTPSEverywhere.instance.https_rules.rewrittenURI(this, this.uri);
76+
var uri = this.uri;
77+
if (!(uri.schemeIs("http") || uri.schemeIs("https"))) {
78+
return true;
79+
}
80+
HTTPSEverywhere.instance.https_rules.rewrittenURI(this, uri);
7781
this.log(DBUG, "populating using alist #" + this.serial);
7882
},
7983

0 commit comments

Comments
 (0)