Closed
Bug 679971
Opened 13 years ago
Closed 5 years ago
remove Navigator.taintEnabled()
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: gal, Assigned: matjk7)
References
Details
(Keywords: addon-compat, dev-doc-complete, site-compat, Whiteboard: [qa-])
Attachments
(4 files)
(deleted),
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
jst
:
review+
asa
:
approval-mozilla-aurora+
asa
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
It returns false and has been unused in probably a decade.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #553991 -
Flags: review?(bzbarsky)
Updated•13 years ago
|
Assignee: nobody → matjk7
Keywords: dev-doc-needed
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Comment 2•13 years ago
|
||
A decade ago was 2001. Netscape 3's experimental (opt-in via envar) data tainting security model was not carried into Nescape 4, so more like 14 years.
/be
Reporter | ||
Comment 3•13 years ago
|
||
Comment on attachment 553991 [details] [diff] [review]
patch
Stealing. Lets land it early in the cycle and watch for web compatibility regressions.
Attachment #553991 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 4•13 years ago
|
||
Sent to try:
http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=626e32292fdc
Assuming all green, will push to inbound after :-)
Status: NEW → ASSIGNED
Flags: in-testsuite-
Comment 5•13 years ago
|
||
(In case anyone pushes this to inbound before me, the r= needs correcting to =gal, rather than bz)
Comment 6•13 years ago
|
||
Keywords: checkin-needed
Whiteboard: [inbound]
Updated•13 years ago
|
Target Milestone: --- → mozilla9
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Comment 9•13 years ago
|
||
And yet some scripts use it, apparently for browser detection.
Keywords: addon-compat
Comment 10•13 years ago
|
||
It's documented in
https://developer.mozilla.org/en/Firefox_8_for_developers
but "Target Milestone" is Mozilla 9.
What's right?
Comment 11•13 years ago
|
||
The release calendar says "Mozilla 9".
Adding "dev-doc-needed" keyword to clarify.
Keywords: dev-doc-complete → dev-doc-needed
Comment 12•13 years ago
|
||
Note moved to Firefox 9 for developers.
Keywords: dev-doc-needed → dev-doc-complete
Comment 13•13 years ago
|
||
This breaks some older MediaWiki installations (bug 695337 and bug 683151). Probably enough to backout for now?!
tracking-firefox9:
--- → ?
Reporter | ||
Comment 14•13 years ago
|
||
This is not a high value patch, so I am not opposed to backing out, but it would be nice to retire this and I don't see any way doing that thats not a little bit painful and involves evangelism to get sites to stop using it.
Comment 15•13 years ago
|
||
> I don't see any way doing that thats not a little bit painful
> and involves evangelism to get sites to stop using it.
Add a fat warning, wait some month and remove it then would at least give them a chance to realize it before last-minute.
(And would increase probability that old MediaWiki pages had updated anyway meanwhile)
Note these bug reports are for Auroa. Would expect much more for Beta and final release.
Our experience is generally that people just ignore the warnings. The only value that they add is us being able to say "hey, we warned you".
Comment 17•13 years ago
|
||
> Our experience is generally that people just ignore the warnings
I'v seen other opinions (eg bug 585877 comment 23)
Comment 18•13 years ago
|
||
Not my experience either; facebook stopped using getAttributeNode shortly after we started to warn about it, for example.
Updated•13 years ago
|
status-firefox9:
--- → fixed
Comment 20•13 years ago
|
||
Why the hell this wasn't this backed out for at least one year or so? It strikes back now:
At least jquery 1.6.2 uses navigator.taintEnabled for browser detection, see bug 711955.
Comment 21•13 years ago
|
||
[take the tracking-firefox9 flag and stick it on your Christmas tree]
Comment 22•13 years ago
|
||
> At least jquery 1.6.2 uses navigator.taintEnabled
That was wrong. It is "jQuery UI 1.8.4"
Comment 23•13 years ago
|
||
Probably breaks a top 10 page in Poland (http://nk.pl/)
Reporter | ||
Comment 24•13 years ago
|
||
As stupid this is, we might have to punt on this removal considering the web compatibility implications. Shame on jquery, seriously.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 25•13 years ago
|
||
I filed http://bugs.jquery.com/ticket/11095 for this.
Comment 26•13 years ago
|
||
> Shame on jquery, seriously.
The nk.pl case is not jquery UI, might be MooTools (and page breaks completely)
Reporter | ||
Updated•13 years ago
|
tracking-firefox10:
--- → ?
tracking-firefox11:
--- → ?
Reporter | ||
Updated•13 years ago
|
status-firefox9:
fixed → ---
Comment 27•13 years ago
|
||
(In reply to Andreas Gal :gal from comment #25)
> I filed http://bugs.jquery.com/ticket/11095 for this.
The bug is in jquery UI 1.8.4, thats a different library than jquery. Bug tracker is here:
http://bugs.jqueryui.com/
Might be fixed in jquery UI 1.8.6
Comment 28•13 years ago
|
||
(In reply to j.j. from comment #26)
> The nk.pl case is not jquery UI, might be MooTools
The browser detection with "taintEnabled()" is not in the MooTools part, it's own code of nk.pl
Updated•13 years ago
|
Comment 29•13 years ago
|
||
Is there any possibility for a workaround that can be communicated through evangelism to the top 10 Polish site nk.pl? See bug 712805 for more background.
Comment 30•13 years ago
|
||
A simple codesearch query seems to suggest that this is a pretty popular UA sniffing tool unfortunately <http://www.google.com/codesearch#search/&q=navigator.taintEnabled&type=cs>.
We could potentially enable checks for existence of this function but prevent scripts from calling it for a while, but I suspect that the required evangelism effort might not justify the gain. :(
Comment 31•13 years ago
|
||
the nk.pl has been fixed today, but they're still detecting browsers basing on this attribute.
If we can get MooTools and jQuery UI to fix this we should be good. I can't find any other top website that would be affected by this change.
Comment 32•13 years ago
|
||
Current MooTools 1.4.2 don't use taintEnabled. Some older version did, though.
Comment 33•13 years ago
|
||
If we decide to back this out, some one needs to prepare a patch which has a new interface which
nsNavigator implements. The interface would contain only taintEnabled(). That way we don't break
any binary addons.
The interface name could be hopefully something like nsINavigator_9_0_2.
Anyone willing to prepare such patch. (I would do it, but unfortunately I'm in a place with
unreliable network connection.)
Comment 34•13 years ago
|
||
Another class of sites that get broken due to taintEnabled used as a lame way to distinguish between Gecko and WebKit are pre-1.16 MediaWiki instances such as in bug 695337 and bug 683151. An example of a popular site like this would be www.wikitravel.org.
Comment 35•13 years ago
|
||
Comment 36•13 years ago
|
||
Don't we want to add a warning?
Comment 37•13 years ago
|
||
> are pre-1.16 MediaWiki instances
That's the crux with this bug, known since October (see comment 13)
Keywords: #relman/triage/defer-to-group
Comment 38•13 years ago
|
||
Comment on attachment 583959 [details] [diff] [review]
backout patch
[Approval Request Comment]
Regression caused by (bug #): N/A
User impact if declined: Older jquery and mediawiki installations will stay broken
Testing completed (on m-c, etc.): Not tested
Risk to taking this patch (and alternatives if risky): Doesn't look too risky, adds a new interface to not break binary add-ons
Attachment #583959 -
Flags: approval-mozilla-beta?
Attachment #583959 -
Flags: approval-mozilla-aurora?
Comment 39•13 years ago
|
||
(In reply to Zbigniew Braniecki [:gandalf] from comment #36)
> Don't we want to add a warning?
I think we do.
Comment 40•13 years ago
|
||
Comment on attachment 583959 [details] [diff] [review]
backout patch
Can we get the backout patch reviewed as well? It isn't a straight backout...
Comment 41•13 years ago
|
||
Comment on attachment 583959 [details] [diff] [review]
backout patch
I don't know who is on vacation.
Attachment #583959 -
Flags: review?(jst)
Attachment #583959 -
Flags: review?(jonas)
Attachment #583959 -
Flags: review?(bzbarsky)
Comment 42•13 years ago
|
||
Oh, hmm, the backout is for 9.0.x,
do we want to take it to Aurora/Beta too? For those backing out the original patch should be enough.
Comment 43•13 years ago
|
||
Or not quite. I'll upload a patch for Aurora/Beta backout
Comment 44•13 years ago
|
||
Comment 45•13 years ago
|
||
Comment 46•13 years ago
|
||
I think at the very least we want it for beta. We need to figure out what to do / how to kill the property for good (or if it is even worthwhile anymore, that much isn't clear).
Comment 47•13 years ago
|
||
Comment on attachment 583959 [details] [diff] [review]
backout patch
r=me.
We should probably try to escalate this to the specs one way or another.... In practice, any UA that sniffs like Gecko or WebKit and does not have this property needs to include some WebKit bugs, so once WebKit fixes those bugs it may have to implement this property as well...
Attachment #583959 -
Flags: review?(bzbarsky) → review+
Comment 48•13 years ago
|
||
OK, so taintEnabled is back, I take it? As of which release? Is it back in 11 or did it make it back in time for 10?
Comment 49•13 years ago
|
||
Comment on attachment 583959 [details] [diff] [review]
backout patch
r=jst too, and sicking is on vacation IIRC.
Attachment #583959 -
Flags: review?(jst)
Attachment #583959 -
Flags: review?(jonas)
Attachment #583959 -
Flags: review+
Comment 50•13 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #30)
> A simple codesearch query seems to suggest that this is a pretty popular UA
> sniffing tool unfortunately
> <http://www.google.com/codesearch#search/&q=navigator.taintEnabled&type=cs>.
Oddly, properly escaping the regexp wildcard '.' returns around ten times as many hits, instead of fewer (3800 vs. 440).
http://www.google.com/codesearch#search/&q=navigator\.taintEnabled
plain taintEnabled returns over 600K hits on codesearch. Use it now before Google shuts it down.
Comment 51•13 years ago
|
||
Comment on attachment 583959 [details] [diff] [review]
backout patch
un-breaking some of the web.
Attachment #583959 -
Flags: approval-mozilla-beta?
Attachment #583959 -
Flags: approval-mozilla-beta+
Attachment #583959 -
Flags: approval-mozilla-aurora?
Attachment #583959 -
Flags: approval-mozilla-aurora+
Comment 52•13 years ago
|
||
I heard that the previous backout patch didn't transplant cleanly to beta.
smaug/bz - Could you prepare new patches for aurora/beta? They can be considered pre-approved and landed once ready. Thanks!
Comment 53•13 years ago
|
||
The "for beta" patch certainly does apply cleanly to beta.
I'll land it soon.
Comment 54•13 years ago
|
||
Do we need to create new interfaces for beta/aurora?
Comment 55•13 years ago
|
||
Comment 56•13 years ago
|
||
Should we back this out from trunk?
Comment 57•13 years ago
|
||
Oops, the patches didn't work on branches after all, and it is too late for me to fix.
(Fix is trivial). Backing out for now, and I'll land tomorrow fixed patches.
Comment 58•13 years ago
|
||
Hopefully better luck this time :)
https://hg.mozilla.org/releases/mozilla-beta/rev/582a82656e0c
https://hg.mozilla.org/releases/mozilla-aurora/rev/f75d64d28603
Comment 59•13 years ago
|
||
I assume given the timestamp this did not make the cut for 10.0b3, will make the cut for 10.0b4?
Comment 60•13 years ago
|
||
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #59)
> I assume given the timestamp this did not make the cut for 10.0b3, will make
> the cut for 10.0b4?
The fix in Comment 58 will be available in 10.0b4.
Updated•13 years ago
|
status-firefox11:
--- → fixed
Comment 61•13 years ago
|
||
From my read of things, this is still present on FF12. What's the plan moving forward? Without outreach, I think we should back this out of m-c/Aurora 12.
tracking-firefox12:
--- → +
Comment 62•13 years ago
|
||
We should back this out of Aurora 12.
Not sure about m-c.
Comment 63•13 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #56)
> Should we back this out from trunk?
Olli - can we perform this backout on both Aurora 12 and m-c? I don't think code cleanup like this is worth continuously backing out unless we want to perform outreach to the sites listed in comment#50 soon. Thanks in advance.
Comment 64•13 years ago
|
||
Backed out of aurora and beta:
https://hg.mozilla.org/releases/mozilla-aurora/rev/f1135f99a0e4
https://hg.mozilla.org/releases/mozilla-beta/rev/49cca9941155
And I went ahead and backed this out of inbound as well, as lame as that is:
https://hg.mozilla.org/integration/mozilla-inbound/rev/db122c1048d7
Updated•13 years ago
|
status-firefox11:
fixed → ---
Target Milestone: mozilla9 → ---
One way forward might be to add a warning any time someone even checks if this function exists. I.e. if someone does
if (navigator.taintEnabled) { ...
or
if ("taintEnabled" in navigator) { ...
As well as add telemetry. Then leave it in that state until we see the telemetry dropping "low enough".
Not sure if it's worth the effort though.
Comment 66•13 years ago
|
||
Yeah, agreed. We could add code in the resolve hook for navigator that would warn in the error console any time someone resolves taintEnabled, should not be hard to do at all.
Comment 67•13 years ago
|
||
I would have been happy to see it die, but I'm not sure if this is a battle we should concentrate on. If we don't, though, we do need to get it into a spec. (HTML, I guess.)
Comment 68•13 years ago
|
||
(In reply to Ms2ger from comment #67)
> I would have been happy to see it die, but I'm not sure if this is a battle
> we should concentrate on. If we don't, though, we do need to get it into a
> spec. (HTML, I guess.)
If that's spec'ed, other browsers will have to implement this empty function. Then, they may be misidentified as Firefox. Spec'ing this will not improve interoperability.
Comment 69•13 years ago
|
||
Backout merged:
https://hg.mozilla.org/mozilla-central/rev/db122c1048d7
Comment 71•12 years ago
|
||
(In reply to Jonas Sicking (:sicking) from comment #65)
> One way forward might be to add a warning any time someone even checks if
> this function exists. I.e. if someone does
>
> if (navigator.taintEnabled) { ...
>
> or
>
> if ("taintEnabled" in navigator) { ...
>
> As well as add telemetry. Then leave it in that state until we see the
> telemetry dropping "low enough".
>
> Not sure if it's worth the effort though.
I would really like to see this possible so that we can make informed judgments about other features we might want to drop, such as .isSupported() etc. If we're going to try removing old features that we hope not many pages use, we should have a reliable way of telling whether it's safe, not just wait to break pages and back out.
Comment 72•12 years ago
|
||
It is really easy to hook things up to telemetry. See bug 717711 for an example. You have to add something to TelemetryHistograms.h, then add a call to Telemetry::Accumulate somewhere. For this, I'm not sure if you'd want "total times we've ever seen a page with this", or just "have ever seen a page with this during the current telemetry session".
Comment 73•10 years ago
|
||
We had a look at implementing navigator.taintEnabled() in Blink but reopened the spec bug instead:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22555#c3
Please help us figure out what the spec should say.
Comment 74•10 years ago
|
||
It was proposed to add a warning more than 3 years ago
(comment 15, comment 39, comment 71, etc.)
Shouldn't it be don now?
Comment 75•10 years ago
|
||
Adding a warning naively won't help because people aren't calling the function, just checking that it exists....
We could make this a replaceable attribute instead, and warn in the getter, I guess.
Comment hidden (obsolete) |
Comment 77•9 years ago
|
||
Is the removal actually in progress? If it is removed, please file a bug at https://whatwg.org/newbug so that we can remove it from the HTML spec as well.
Comment 78•9 years ago
|
||
I am not aware of any plans to remove it at this time, and I'm not sure why we're bothering with adding it to the compat doc...
Flags: needinfo?(kohei.yoshino)
Comment 80•6 years ago
|
||
This is now part of the standards https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-taintenabled
So this should probably be closed now?
Flags: needinfo?(htsai)
Comment 81•6 years ago
|
||
Better to ask a DOM peer or the owner.
Flags: needinfo?(htsai) → needinfo?(peterv)
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Comment 82•5 years ago
|
||
Unfortunate.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 5 years ago
Flags: needinfo?(peterv)
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•