Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | <!-- test by moz_bug_r_a4@yahoo.com --> |
michael@0 | 2 | <body onload="a()"> |
michael@0 | 3 | <script> |
michael@0 | 4 | var targetUrl = "http://example.com/"; |
michael@0 | 5 | var l; |
michael@0 | 6 | |
michael@0 | 7 | function a() { |
michael@0 | 8 | var o = {}; |
michael@0 | 9 | o.toString = function() { |
michael@0 | 10 | l(); |
michael@0 | 11 | return "a"; |
michael@0 | 12 | }; |
michael@0 | 13 | var f = Object.getOwnPropertyDescriptor(Document.prototype, "title").set; |
michael@0 | 14 | setTimeout(f.bind(document), 0, o); |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | function l() { |
michael@0 | 18 | var l = false; |
michael@0 | 19 | onunload = function() { |
michael@0 | 20 | l = true; |
michael@0 | 21 | }; |
michael@0 | 22 | location = targetUrl; |
michael@0 | 23 | do { |
michael@0 | 24 | var r = new XMLHttpRequest(); |
michael@0 | 25 | r.open("GET", location.href, false); |
michael@0 | 26 | r.overrideMimeType("text/plain"); |
michael@0 | 27 | try { r.send(null); } |
michael@0 | 28 | catch (e) {} |
michael@0 | 29 | } while (!l); |
michael@0 | 30 | } |
michael@0 | 31 | </script> |