Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

When 'Block all unencrypted requests' is checked, FTP is still allowed. - #15813

Merged
Hainish merged 1 commit into
EFForg:masterfrom
Hainish:fix-blocking-ftp
Jun 25, 2018
Merged

Hainish merged 1 commit into
EFForg:masterfrom
Hainish:fix-blocking-ftp

Conversation

@Hainish

@Hainish Hainish commented Jun 18, 2018

Copy link
Copy Markdown
Member

This is a fix for Chromium. Firefox still doesn't recognize the
<all_urls> special string for FTP urls.

@Hainish

Hainish commented Jun 18, 2018

Copy link
Copy Markdown
Member Author

@bcyphers care to look this over?

@bcyphers

Copy link
Copy Markdown
Contributor

Sure! I'll take a look later this week.

@Bisaloo

Bisaloo commented Jun 19, 2018

Copy link
Copy Markdown
Collaborator

Related: #2311

@Hainish
Hainish force-pushed the fix-blocking-ftp branch from 2d40ddd to 10529f0 Compare June 23, 2018 01:06
// Registers the handler for requests
// See: https://github.com/EFForg/https-everywhere/issues/10039
chrome.webRequest.onBeforeRequest.addListener(onBeforeRequest, {urls: ["*://*/*"]}, ["blocking"]);
chrome.webRequest.onBeforeRequest.addListener(onBeforeRequest, {urls: ["<all_urls>"]}, ["blocking"]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason to use <all_urls> rather than enumerate ["*://*/*", "ftp://*/*"]?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Firefox doesn't seem to care either way, and never triggers this hook even with FTP urls. I think you're right though, and enumerating both is a more constrained criteria than just <all_urls>.

This is a fix for Chromium. Firefox still doesn't recognize the
<all_urls> special string for FTP urls.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants