Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
filter out non-http(s) urls in https everywhere
Browse files Browse the repository at this point in the history
There is no need to check redirect loops unless a URL is http or https.

Auditors: @bbondy

Test Plan: n/a
  • Loading branch information
diracdeltas committed Oct 26, 2016
1 parent ee5cb60 commit 957b748
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/httpsEverywhere.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ function onBeforeRedirect (details) {
if (!mainFrameUrl || !Filtering.isResourceEnabled(module.exports.resourceName, mainFrameUrl)) {
return
}
// Ignore URLs that are not HTTP
if (!['http:', 'https:'].includes(urlParse(details.url).protocol)) {
return
}

var canonicalUrl = canonicalizeUrl(details.url)

Expand Down

1 comment on commit 957b748

@bbondy
Copy link
Member

@bbondy bbondy commented on 957b748 Oct 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

For future ones though pls link to an issue because tests are done based on presence of issues. Thanks!

Please sign in to comment.