-
Notifications
You must be signed in to change notification settings - Fork 14
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
The document.referrer override feature is not working as it should #17
Comments
Sites could circumvent the document.referrer modification using reflection, see bug #17. Modifying the Document.prototype avoids this.
Thank you for the report! I've committed a fix for the reflection issue (ab7571f), could you check if it works? 🐱 I'm not sure if there's anything I can do about the timing issue, if you have a proposal on how it might be done I'll be all ears. 👂 Otherwise I'm afraid we'll have to wait for the Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1601496 to be fixed. |
Looks good.
One way to do it might be to duplicate all the extension logic, namely all the rules and the decision engine, into a content script that is then registered dynamically using Thank you, airtower-luna. P.S. The last comment in that Bug 1601496 as of this comment said "Putting this one in the backlog for now.". Will probably take another 10+ years to be "fixed", I think. |
@airtower-luna Continuing from #20 An intractable problem remains: Sad news: it probably cannot be worked around, at least not without going into very insane heights. Oh how wrong I was! Things are not that simple! There is an INSANE rabbit hole: "window.frames". The insanity, quoting from MDN:
Quoting from a comment by Boris Zbarsky in the linked mozilla.dev.platform Google Groups: (emphasis mine)
It is also mentioned that this insane Web API has existed since the days of Netscape in the 90s! Netscape! 😱 The workaround is insane: we need to hook things like
Help wanted. Or can someone just FIX that Bug? |
Oh dear, what a mess! 🙀 That kind of sounds like writing a patch for at least one of those Firefox bugs might be a more effective use of time than trying to block every possible circumvention trick, especially considering that adding complex anti-circumvention code kind of invites bugs. 😅 |
Take a look at my workaround! https://github.com/tartpvule/referer-mod/tree/oot-bug1424176 😄 |
A good anti-fingerprinting script to test against is CreepJS - https://abrahamjuliot.github.io/creepjs/ With Referer Modifier 0.9 enabled, it fails some document.referer checks. I haven't tested the WIP commits yet. |
@r-a-y Interesting! I'm learning something new! AFAICT:
Invalid. They have
Solvable by defining the hook as a
Unsolvable. We have no opportunity to intervene at all. 😞 All in all, I'm not sure it's worth the effort to gun for 100% fingerprint-proofing. Anyway, check out my |
I have created a souce code patch for |
I'm going to close this because a reliable fix would have to be done in Firefox. I've added a note about the limitation to the README with 0b991c4. |
I am using Firefox ESR 78.6.0 on Linux. I found some issues here.
A trivial bypass:
Reflect.getOwnPropertyDescriptor(Document.prototype, 'referrer').get.call(document);
Firefox does not actually have the
referrer
property on thedocument
object, but on its prototype,Document.prototype
.Due to Firefox's current limitations, there is a race condition between asynchronous operations in the extension content scripts and the page's scripts.
It is possible for the site to sometimes grab the original referrer before
sending.then(setReferrer, handleError);
resolves.Observe the results, in very fast-loading pages, it is possible for "One" and "Two" to show the original referrer; "One" being more likely to get it.
The text was updated successfully, but these errors were encountered: