-
Notifications
You must be signed in to change notification settings - Fork 83
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
CNAME first-party resources detected as third-party #909
Comments
Yes, by-design. Pre v1.25 these CNAMEs were cloaked, now they're getting uncloaked. |
I know. I however believe this is very much not by-design. It is simply an edge case that was missed. The first-party page itself cannot be third-party. |
Not an edge case. Infact there are many such cases, one for example is
You're visiting Read up #780, the case behind CNAME uncloaking implementation. |
If you visit page A and its main_frame resolves to B then all requests to B should be seen as first-party? This can be feature request. Currently main document CNAME is not even resolved unless you toggle If you visit A and it now resolves to CNAME_B and you don't even know about it now, then what is the harm to treat all other subresources from CNAME_B as trusted? |
Yes, they are 3rd-party. For instance they are even more 3rd-party than The bottom line is that advanced user mode is for advanced users ready to deal with breakage as a result of using broad blocking rules, and the uncloaking of canonical names is no different -- I rather not start to make exception to this. Yes, |
Just because dynamic filtering is for advanced users doesn’t mean it has to be a pain to use. I see where you’re coming from. However, I disagree. If the alleged first party simply does not exist (except for being a domain name), I don’t see the point. In fact, allowing the "real" domains behind the user-facing domains could be dangerous, as they may also host other pages. Resources from these pages would then be allowed. |
Sorry, I am not understanding what you are saying. |
I assume you’re referring to the last paragraph. When I want to allow scripts on the example site linked above, I have to allow third-party scripts from Let’s say By using only the uncloaked domain for filtering purposes, we lose some accuracy. |
But your are not using only the uncloaked domains, these are added to the usual set of domains seen by uBO. And in any case, your worry is unspecific to uncloaked cnames, the same can be said of any 3rd party. I am not understanding your argument, there is no added worries here, just extra rules to create for 3rd parties which were otherwise hidden before. |
I was also surprised to find that I had to unblock the "true" name of domains that are CNAMEs, because its own scripts are now seen as 3rd-party. If I am understanding right, the worry @fuzzykiller has is this:
However there is still an issue - it seems I can't allow resources from |
Both untrue. That's not how it is. Dynamic Filtering rules are made per site, unless you explicitly allow |
I explained that the second one was untrue, but I don't see how the first one is untrue. For example, suppose I have this rule:
This now blocks
But what if I had wanted to keep blocking scripts from |
A CNAME will never appear as a CNAME when directly browsed to, simply not possible. Post a real life example if you have a case. |
No, this won't unblock For instance, in hard mode:
Now creating an allow rule for
|
I already agreed with that analysis, in the bullet point directly under the part you have both quoted. I don't know why we are arguing against a point I discounted at the time I made it.
That is my real case, which led me to this issue in the first place. |
Sorry, I went to answer immediately without reading the rest first. |
I don't see why this is an issue -- when you create an allow rule for |
uBO doesn't detect any CNAMEs at |
Sorry, I think I've muddled things up a bit.
I think I agree with this, now that you put it that way. |
I partially disagree with this premise. It is not about "trustability", it is about granularity of control (different levels of "trust"). Take, for example, when I visit As for the "trustability", what about the case of subdomains? For example, since Should CNAMEs not be treated with the same (or greater) granularity as subdomains? A server might look at HTTP Headers for For me, I want greater granularity of control. When I visit To quote:
Thank you |
It does distinguish them, |
Let’s not forget that the ongoing discussion is not what this issue was originally about. It only started later because I made an assumption that was not entirely true. The original issue, as a reminder: I believe that if @gorhill said that’s not going to happen and that’s that. The intricacies of dynamic filtering with uncloaked hosts should probably be discussed elsewhere. Like on Reddit or whatever. |
I see no way to write a rule to "noop things from first-party www.instagram.com" and "block things from third-party foo-instagram.bar.facebook.com and facebook.com". Writing a filter ( Is there really a way to write such rule(s)? |
To summarize: I am trying to make the case that "first-party whatever.com that is actually something-else.com" should be managable separately from "third-party something-else.com". As far as I can see, gorhill made the statement in #909 (comment). I partially disagree with that, and one of arguments is: since the browser treats them differently, should an advanced uBlock user not be able to make the same distinction in the rule as well? Should a new issue be made or is there already a discussion elsewhere? I am not aware of one. |
This isn't the place for discussion, do it on /u/uBlockOrigin alongwith any questions you have. |
"Too broad"? Really? You have more control now and your assessment is that you have less? Sorry my brain can't comprehend why you think there is an issue. Best is that you scratch your own itch regarding what you want, on my side I am satisfied uBO is still on good foundation after introducing de-aliasing and I won't make it entirely something else (which I fail to comprehend), you are best placed to do this. |
Prerequisites
Description
When a site is fully CNAME-hosted (for example
*.azurewebsites.net
is backed by*.windows.net
is backed by*.cloudapp.net
), its origin is considered third-party.A specific URL where the issue occurs
Steps to Reproduce
Expected behavior:
Website consisting of (or requiring) only first-party scripts should work.
Actual behavior:
Requests to first-party scripts are blocked as third-party because CNAME.
Your environment
The text was updated successfully, but these errors were encountered: