-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support same-origin
filter option
#44
Comments
That's NOT a third-party domain, but rather a sub-domain of the root domain. Sub-domains are also considered first-party, hence not subjected to that filter. |
You are asking to change the semantic of widely used and well defined filter syntax. |
I shouldn't have said "declined", it's not even close to a good idea, it's asking to break uBO for everybody else. |
Excellent point. I shouldn't have suggested changing the meaning of "third-party". Could you please consider this a feature request, for a qualifier meaning "non-same-origin"? "non-same-origin" is what I, as a filter developer, usually want when I use the "third-party" qualifier. I suspect that this is the case for other filter developers. |
same-origin
filter option
It's unlikely I will ever implement this unless this solves actual, real-world filter issues for majority of users. |
What I think is an important use case is a rule, "*$non-same-origin". Which would then be combined with whitelisting of permissible non-same-origin URL patterns for given domains. This is a different approach than URL blacklisting. Whitelisting has its own pros and cons, and it's a reasonable use of uBlock0, and I think it's consistent with the apparent goals of uBlock0. Thank you for considering this. |
Partially, but not fully. I believe that a whitelist-oriented approach, a Filter of "*" with a user Rule of "no-strict-blocking: * true" would have at least two drawbacks (relative to a Filter of "*$non-same-origin"):
|
Just saw this thread and it's interesting that same origin differs in some details from the eTLD that determines $third-party in uBO. I had never thought about this before, but I would've assumed they were the same. After all, Mozilla is the keeper of the eTLD list for the purposes of security and proper cookie scoping. Anybody know why that is? |
I wonder the same thing, @joey04. I'll just speculate, for a moment... In the early days of the Web, we were very cavalier and trusting, and there was a lot of domain-name-based ad hoc "security" by universities and such, sites were often One practical thing I can tell you, from a current |
Interesting thoughts, Neil. I'd never heard of Junkbuster or Privoxy before. My only web blocking has been browser extensions, beginning with the original Adblock for Firefox long ago. I read more about this topic to better understand why eTLD and same origin policy aren't fully in sync within browsers. RFC 6454, which specifies the web origin policy, states that "In some sense, the origin granularity is a historical artifact of how the security model evolved." That makes sense, given that CSP and CORS have emerged because a static URI origin policy is not a rock-solid solution. Meanwhile, eTLD's primary use is for cookie restrictions. "Since there was and remains no algorithmic method of finding the highest level at which a domain may be registered for a particular top-level domain (the policies differ with each registry), the only method is to create a list." So I simply conclude that various browser developers created these methods to deal with specific issues as the web has evolved over the last 20+ years. As for blockers, since ABP uses eTLD it makes perfect sense that uBO does the same for static rule parity. (And kudos to gorhill for creating eTLD auto-update capability that ABP doesn't have). |
Interesting. Writing Adblock Plus filters documentation
|
Didn't see @gwarser's post while editing my own above, with the same RFC link. (We ended up quoting different parts of the same section.) From his ABP quote, it's funny they mention "origin" as the determining factor of party-ness. But they must be using eTLD for it, which as we now know isn't exactly the same in all cases. (It's interesting, but I don't consider it a problem. For me, uBO works great as-is.) |
same-origin
filter optionsame-origin
filter option
Never noticed this thread before, never considered third party WOULDN'T apply to subdomains. It certainly explains some workarounds I've had to add. A request that crosses server boundries IS untrusted unless proven otherwise. It's the entire point of why you don't want development applications under the same domain as production. foo.dev.bar.com could read cookies for bar.com. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
WHATWG calls this a "site" https://html.spec.whatwg.org/#sites |
This comment has been minimized.
This comment has been minimized.
The issue here is for a static filter option, for dynamic filtering this is #957. |
Prerequisites
Description
In the filter language, the "third-party" qualifier/condition has long seemed to consider subdomains to be same-party.
For example, if you have a blocking filter for "*$third-party" in effect, and visit a URL of origin "www.example.com", then "example.foo" will be blocked, but "sneaky.example.com" will not be blocked.
I'd like to propose that either the "third-party" qualifier be changed to mean non-same-origin, or that a qualifier called "non-same-origin" be added. The reason is that non-same-origin is important and much more useful than "third-party" in contemporary third-party Web snooping practices. Today, we have little reason to believe that a shared parent organizational domain says much about whether a non-same-origin domain should be considered same-party.
(Thank you for considering this. I am a big fan of uBlock Origin specifically.)
A specific URL where the issue occurs
https://github.com/uBlockOrigin/uBlock-issues/issues
Steps to Reproduce
Expected behavior:
What I'd like to happen is for subdomain URLs from, e.g., domain "live.github.com" to be blocked.
Actual behavior:
"live.github.com" is not blocked.
Your environment
The text was updated successfully, but these errors were encountered: