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.

Redirect conflict with uBlock Origin #14961

Closed

Description

@terrorist96

Type: other

This extension failed to redirect a network request to https://s7.addthis.com/js/300/addthis_widget.js#pubid=tenthamendment because another extension (uBlock Origin) redirected it to chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm/web_accessible_resources/af3c919ee9a3d97f5dedaf2f8bec146a.javascript?secret=qqesz4qhqw5h.

Looks like a surrogate redirect conflict?

@gorhill

Activity

  1. blackhelicoptersdotnet commented on Mar 22, 2018

    @blackhelicoptersdotnet

    I'm getting the same, in my case with a Google Analytics URL.

    Appeared today with version 2018.2.26

    This extension failed to redirect a network request to https://www.google-analytics.com/analytics.js because another extension (uBlock Origin) redirected it to chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm/web_accessible_resources/59fb24a2d12455d15bea20980e8a6801.javascript?secret=jblm6nqcej3g.

  2. gorhill commented on Mar 22, 2018

    @gorhill
    Contributor
  3. jeremyn commented on Mar 22, 2018

    @jeremyn
    Contributor

    @gorhill Your comment says "The resources used by uBO for redirection purpose are found in this file." but the linked file, https://github.com/gorhill/uBlock/blob/master/assets/ublock/resources.txt , doesn't exist anymore. Is there an equivalent?

  4. gorhill commented on Mar 22, 2018

    @gorhill
    Contributor

    I corrected the link, the resource files have been moved to a different repo since I wrote this comment: https://github.com/uBlockOrigin/uAssets/blob/master/filters/resources.txt.

  5. jeremyn commented on Mar 22, 2018

    @jeremyn
    Contributor

    Thanks @gorhill .

    As an enhancement for HTTPS Everywhere, we might take resources.txt and use it to create exceptions for the various rewrites it does. For example we could add a checkbox that says "Exclude uBlock Origin rewrites" which, if checked, will not rewrite the items in resources.txt, and instead let uBlock Origin handle them.

    I'm not saying this is a good idea to do, but it's something that could be done.

  6. mystica555 commented on Mar 22, 2018

    @mystica555

    I would appreciate this 'resources.txt' as exeptions, because honestly I don't want https everywhere to be redirecting me to tracking sites I explicitly block with ublock; the way it works now, trackers totally being blocked from loading, is the preferred scenario. I just want the ! to disappear making me think there are 'actual' problems with https on the site I am visiting.

  7. jeremyn commented on Mar 22, 2018

    @jeremyn
    Contributor

    @terrorist96 @blackhelicopters @ariksc @mystica555 Can you all please edit your comments to provide a URL where you go to see the problem? Not the error from the developer console, but the URL in your browser's address bar.

  8. terrorist96 commented on Mar 22, 2018

    @terrorist96
    ContributorAuthor

    I'll try to post it if I come across it again. BTW, here's the PR Privacy Badger made to avoid this issue from occurring:
    EFForg/privacybadger#1905

  9. gorhill commented on Mar 22, 2018

    @gorhill
    Contributor

    @jeremyn

    we might take resources.txt and use it to create exceptions for the various rewrites it does

    In that case resources.txt is not the right place for this, that would rather be the filters themselves, those with the redirect= option in any of the filter lists in https://github.com/uBlockOrigin/uAssets/tree/master/filters. There is a lots of these, and these lists are constantly edited. For the specific case here, this would be this filter:

    ||addthis.com/*/addthis_widget.js$script,redirect=addthis.com/addthis_widget.js
    

    Which in plain language means: redirect all network requests for addthis_widget.js from addthis.com to a local, neutered version of the script.

  10. madusmacus commented on Mar 23, 2018

    @madusmacus

    This extension failed to redirect a network request to https://www.google-analytics.com/ga.js because another extension (uBlock Origin)

    I have also had

    This extension failed to redirect a network request to https://s7.addthis.com/js/300/addthis_widget.js#pubid=tenthamendment because another extension (uBlock Origin) redirected it to chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm/web_accessible_resources

  11. jeremyn commented on Mar 23, 2018

    @jeremyn
    Contributor

    @gorhill Thanks. So it sounds like the logic for us might be: go through the files in https://github.com/uBlockOrigin/uAssets/tree/master/filters , look for filter lines that start with || and include redirect=, and add those partial-URLs to a list controlled by the checkbox I suggested earlier at #14961 (comment).

    Why is this issue popular suddenly? Did something change recently in uBlock Origin?

  12. gorhill commented on Mar 23, 2018

    @gorhill
    Contributor

    Why is this issue popular suddenly? Did something change recently in uBlock Origin?

    I wondered. uBO has supported redirection since quite a while now, to data: URIs. However in a recent release uBO will redirect to web accessible resources instead of data: URIs. This has changed to solve long standing issue gorhill/uBlock#2823. Not sure whether this is what is causing more reports about this -- redirecting to data: URIs was also causing such conflicts before (as pointed out at old issue gorhill/uBlock#1170).

  13. jeremyn commented on Mar 23, 2018

    @jeremyn
    Contributor

    All of the reports here so far are reporting redirects to something under web_accessible_resources, so the recent uBlock Origin change may be related. But it sounds like these reporters should have seen the same error before, except it would have been to data: instead of web_accessible_resources, right?

  14. 42 remaining items

  15. Hainish commented on Apr 23, 2018

    @Hainish
    Member

    @gorhill do you have statistical data on how often each of these patterns are matched in uBlock Origin? I'm wondering if we can avoid conflicts in a comprehensive but not complete way. We may be able to avoid the vast majority of conflict events in this way.

  16. jeremyn commented on Apr 23, 2018

    @jeremyn
    Contributor

    @Hainish If @gorhill doesn't have statistical data, then at least based on the comments here and gorhill/uBlock#3639 , specific handling for Google Analytics would take care of a lot of cases.

  17. Paradoxum commented on Apr 23, 2018

    @Paradoxum

    Is there any way to stop the (!) icon appearing at the very least for us end users? I'm getting this constantly and it's so frustrating.

  18. gorhill commented on Apr 24, 2018

    @gorhill
    Contributor

    I added a partial revert of the fix to gorhill/uBlock#2823 (which is what the redirection to "web accessible resources" was fixing). uBO will avoid to redirect to a "web accessible resource" and instead redirect to a data: URI when the two following conditions are present:

    • uBO is running in a Chromium-based browser
    • The URL to redirect is a non-secure http: one (i.e. one which HTTP-Everywhere will likely want to redirect)
  19. lightheaded commented on Jun 11, 2018

    @lightheaded

    Just wanted to leave a note here that I'm still occasionally receiving this error on HTTPS Everywhere 2018.4.11

  20. Hainish commented on Jun 13, 2018

    @Hainish
    Member

    @lightheaded thanks, I've pinged Chromium again on this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=111700#c37

  21. gorhill commented on Jun 13, 2018

    @gorhill
    Contributor

    @lightheaded Having the exact web page where this happens would be useful to determine whether this is really the same exact issue identified here.

  22. lightheaded commented on Jun 27, 2018

    @lightheaded

    @gorhill it's hard to track as it seemingly happens at random. But today I caught it blocking something on Amazon:

    This extension failed to redirect a network request to https://g-ecx.images-amazon.com/images/G/02/kindle/merch/2017/ACC/Promo/ACCBundles//UK_Bundle_Muscat_160X97.jpg because another extension (HTTPS Everywhere) redirected it to https://d1ge0kk1l5kms0.cloudfront.net/images/G/02/kindle/merch/2017/ACC/Promo/ACCBundles//UK_Bundle_Muscat_160X97.jpg

  23. gorhill commented on Jun 27, 2018

    @gorhill
    Contributor

    @lightheaded I am not aware of any filters in uBO which would want to redirect the URL your are mentioning.

    Also, I find it surprising that HTTPS Everywhere would want to redirect a https: URL to another https: URL. The one related rule in HTTPS-E is to redirect from http: to https::

    In any case, assuming you created custom rules to cause the behavior you are observing on your side, as said above, uBO fix with regard to HTTPS-E is a mitigation, i.e. this should take care of most conflicts, but this won't take care of conflict arising as a result of HTTPS-E redirecting a https: URL to another https URL (which I believe shouldn't be happening normally?)

  24. jeremyn commented on Jun 27, 2018

    @jeremyn
    Contributor

    @gorhill FYI, there's an open issue #10843 to remove https:->https: redirects where possible.

  25. cschanaj commented on Aug 28, 2018

    @cschanaj
    Collaborator

    It seems that chrome will stop notifying the users for extension conflicts in the dev channel.

    This CL introduces the onActionIgnored event on the web request API which is
    fired when an extension's proposed modification to a network request is ignored.
    This happens in case of conflicts with other extensions. This should allow the
    extensions to address conflicts as they like.

    Also, we no longer notify the user in case of conflicts between extensions.

    Ref

    https://groups.google.com/a/chromium.org/forum/#!msg/extensions-reviews/YYn1etdxjgw/55bBFxxfCgAJ

    https://developer.chrome.com/extensions/webRequest#event-onActionIgnored

  26. Hainish commented on Aug 28, 2018

    @Hainish
    Member

    Fantastic! Thanks for the heads up @cschanaj - we should definitely handle this event.

  27. terrorist96 commented on Nov 9, 2018

    @terrorist96
    ContributorAuthor

    Can this be closed? Marked as fixed since Aug 24.

    Consider starring this Chromium issue if you want a fix, I added a comment at the end:
    https://bugs.chromium.org/p/chromium/issues/detail?id=111700#c31

    I haven't had this issue for a while.

  28. Libbum commented on Nov 9, 2018

    @Libbum

    Yep, nothing on my systems for a while too.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions