Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conflict with uBO behind-the-scene rule #17

Closed
atomGit opened this issue Jul 15, 2023 · 7 comments
Closed

conflict with uBO behind-the-scene rule #17

atomGit opened this issue Jul 15, 2023 · 7 comments

Comments

@atomGit
Copy link

atomGit commented Jul 15, 2023

for any image the following error is produced: Error trying to load image-file for parsing of the metadata!

this is due to a non-default filter rule for uBO: behind-the-scene * 3p block

if i set that to 'noop', xIFr works fine - the problem is, i don't want to globally allow 3rd party, but so far i'm unable to produce a rule to allow 3p only for xIFr - i've tried the following...

behind-the-scene * moz-extension:https://[ext. ID]/ noop
[ext. ID].moz-extension-scheme * 3p noop
@StigNygaard
Copy link
Owner

StigNygaard commented Jul 15, 2023

Hi @atomGit
Thanks for reporting your problem. I'm guessing uBO is the uBlock Origin extension. But I have no knowledge about the filters in that, and what "behind-the-scene * 3p block" does?
However I have updated xIFr today to new version 2.12.0. Are you running the new version? And was reported also a problem yesterday with the "old" version 2.11.0?

@StigNygaard
Copy link
Owner

StigNygaard commented Jul 15, 2023

Hi again @atomGit

[Still without fully understanding what your filter does...] you could try one thing. xIFr has some "hidden developer settings":

On xIFr's Options-page, double-click on the camera-logo at top of page. A section of hidden settings and info should become visible at bottom of Options-page, including the choice of three different "fetch-modes". Here "Autoselect type of fetch" should be default, but try changing that to "Force backend-fetch" and see if that makes any difference to your problem?

@atomGit
Copy link
Author

atomGit commented Jul 15, 2023

ah ha - 'Force backend-fetch' works - thanks for that

for uBO, "behind-the-scene" means that uBlock 'sees' some traffic, but it doesn't necessarily know where it originated - in this case i'd venture a guess that xIFr is using a script to fetch the image somehow and that request is being blocked via my filter

@atomGit atomGit closed this as completed Jul 15, 2023
@StigNygaard
Copy link
Owner

StigNygaard commented Jul 15, 2023

@atomGit , yes by default xIFr currently fetches from a (frontend-)script running very much like it was part of the webpage you are visiting (semi-integrated with it). But by changing to "backend", the fetch will be "decoupled" from webpages and it will look like something the browser does "by itself" completely independent of what webpages you are visiting. At least that's the closest I can come to explain my understanding of it :-)
Btw, when moving to new Manifest v3 model of webextension (which xIFr will do sooner or later), I will make backend-fetching the normally used, because MV3 is much more restrictive in how/where you can communicate in "frontend-scripts". The downside to backend-fetch is that it might make parsing a bit slower because I probably still need to send/forward received image to a "frontend script" for parsing. But my early testresults looks pretty good. Only I have noticed that in Firefox I can so far only read images from locale filesystem if using "frontend-fetch".

@atomGit
Copy link
Author

atomGit commented Jul 15, 2023

Mozilla has said they will continue to support manifest v2 ... given their track record however, i'm not counting on it

@StigNygaard
Copy link
Owner

Mozilla has said they will continue to support manifest v2 ... given their track record however, i'm not counting on it

I think their statements are meant to be understood like as they have no current plan [on when to] to out-phase MV2.

But once their MV3 support has matured, they will for sure make plans for how and when to out-phase MV2. It would be strange if they didn't do that. After all getting rid of MV2-support is also a question about optimizing Firefox for performance, security and maintainability.

@StigNygaard
Copy link
Owner

FYI @atomGit or anyone else who might have enabled "Force backend-fetch" in xIFr's "secret settings".
In the latest versions of xIFr I have changed the strategy in the default "Autoselect type of fetch". It might work in more cases than forcing xIFr to always do "backend-fetch". At least I suggest you try the autoselect-mode.

I might do further adjustments to the strategy in autoselect-mode, based on feedback and my own experiences. But current strategy is doing a "frontend fetch" when image is embedded from same domain as the webpage itself, or if image is embedded with a file:, blob:, or data: URL. In all other cases xIFr will now do a "backend fetch" in autoselect-mode.

I will probably upgrade xIFr to MV3 type extension in a couple of months, and expect this will also be the strategy after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants