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

Add ftp: to 'Block all HTTP requests' #2311

Closed

Description

@avlidienbrunn

Hi!

I'm not 100% sure that I've understood the original intention of the 'Block all HTTP requests' feature, but I personally enable it when I want to make sure that I don't accidentally receive anything over an unencrypted connection.

If that is the intended reason, then I would like to suggest that you add the "ftp:" protocol handler to the blacklist as well, since browsers are capable of serving unencrypted content over FTP too.

Activity

  1. jsha commented on Jul 23, 2015

    @jsha
    Member

    You've got the right idea about the intent. Probably this should be a whitelist containing just HTTPS rather than a blacklist. Thanks for the bug report!

  2. avlidienbrunn commented on Jul 24, 2015

    @avlidienbrunn
    Author

    Great. When you do, keep in mind that "filesystem:" URIs also trigger the onBeforeRequest event (for some reason) in Chrome. For example, this will trigger the onBeforeRequest on a "filesystem:" URI without ever sending a request and thus shouldn't be blocked:

    function onInitFs(fs) {
        fs.root.getFile('ex.png', {create: true}, function(fileEntry) {
            fileEntry.createWriter(function(fileWriter) {
                // Create a new Blob and write it to ex.png.
                var blob = new Blob([':)'], {type: 'image/png'});
                fileWriter.write(blob);
                elem=document.createElement("img");
                //Create a filesystem: URL and append it to the current document
                elem.src=fileEntry.toURL();
                document.documentElement.appendChild(elem);
            });
        });
    }
    window.requestFileSystem  = window.requestFileSystem || window.webkitRequestFileSystem;
    window.requestFileSystem(window.TEMPORARY, 1024*1024 /*1MB*/, onInitFs);
    
  3. gripedthumbtacks commented on Jan 19, 2017

    @gripedthumbtacks

    This is still present and "Block all unencrypted requests" does NOT prevent unencrypted FTP (!)

    A proper fix would, at minimum, block the ftp:// protocol scheme when "Block all unencrypted requests" is enabled.

  4. Hainish commented on Jun 25, 2018

    @Hainish
    Member

    Fixed by #15813 (though Firefox is still broken, I've filed a bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1471065)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions