XPCVariant::VariantDataToJS() unwraps double-wrapped objects even when it
Created attachment 390218 [details]
testcase - Arbitrary code execution
Do we need this on 1.9.0? This definitely block 1.9.1.x but not sure if it's for .2 or .3.
Yes, this affects Firefox 3.0.x
Created attachment 390374 [details] [diff] [review]
Work in progress
This patch fixes this bug, but I'm seeing spurious errors in the livemark service with it applied.
Created attachment 390563 [details] [diff] [review]
The spurious errors were due to my incorrectly backing out bug 384632.
The blocking184.108.40.206+ is a soft block, we'll take it on the 1.9.0 branch when it gets fixed on the 1.9.1 branch.
Comment on attachment 390563 [details] [diff] [review]
This caused a bunch of password manager test failures along these lines:
/test/test_basic_form_observer_autofillForms.html | Checking foundLogins is array - got "Object", expected "Array"
82398 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/components/passwordmgr
82407 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/components/passwordmgr/test/test_basic_form_observer_foundLogins.html | Checking foundLogins is array - got "Object", expected "Array"
and various other stuff, but I suspect most of it is due to the tests that got the errors above failing and due to the fact that the tests in this dir all depend on each other(!). Which means you have to run with
to test reasonably; just running a single test won't work. And if you run a single test and then the whole dir that will also fail...
It's not clear to me whether this is a problem in the test or in the patch yet, but for now backed out to get the tree green: http://hg.mozilla.org/mozilla-central/rev/c1ab8650e0ce
This is a P1 1.9.2 blocker, thus blocking Firefox 3.6a1 - any ETA on re-landing or analysing why this caused so many test failures?
Justin: can you take a second to see if you can figure out why the PW Mgr tests failed?
So, this was a test added for bug 492153. That bug added notifications for when pwmgr does things when processing a form. The notification's subject is a nsIPropertyBag, with various properties set. One of these is a JS array of relevant logins.
The notification is built in nsLoginManager.js's _notifyFoundLogins() as
And the test is checking
propbag.get("foundLogins").constructor.name, "Array", "Checking foundLogins is array");
I'd guess that either something is going wrong in setting the property (I think there's some XPCOM magic being used to shove an Array into an nsISupports param), or that checking .constructor.name isn't a reliable thing to do. [ISTR Firebug having run into similar problems.]
mrbkap, does this help?
I need to know if this needs to land for alpha 1 in order to make 1.9.2; it's literally holding our alpha production and branch at this point.
Please respond ASAP.
(In reply to comment #13)
> I need to know if this needs to land for alpha 1 in order to make 1.9.2; it's
> literally holding our alpha production and branch at this point.
> Please respond ASAP.
Sorry, I should have commented here... The reason for the MochiTest failures are now blocking this bug. Once those bugs land, this one should be able to as well.
This probably needs to wait for the next round of releases rather than trying to rush this into 220.127.116.11/18.104.22.168
Mass change: adding fixed1.9.2 keyword
(This bug was identified as a mozilla1.9.2 blocker which was fixed before the mozilla-1.9.2 repository was branched (August 13th, 2009) as per this query: http://is.gd/2ydcb - if this bug is not actually fixed on mozilla1.9.2, please remove the keyword. Apologies for the bugspam)
This is blocking 22.214.171.124 and 126.96.36.199 (code freeze Sept 22!). We probably need a branch patch that includes any regression fixes, or we need branch approval requests on those bugs too.
Comment on attachment 390563 [details] [diff] [review]
Approved for 188.8.131.52 and 184.108.40.206, a=dveditz
Checking in js/src/xpconnect/src/xpcprivate.h;
/cvsroot/mozilla/js/src/xpconnect/src/xpcprivate.h,v <-- xpcprivate.h
new revision: 1.286; previous revision: 1.285
Checking in js/src/xpconnect/src/xpcvariant.cpp;
/cvsroot/mozilla/js/src/xpconnect/src/xpcvariant.cpp,v <-- xpcvariant.cpp
new revision: 1.32; previous revision: 1.31
Checking in js/src/xpconnect/tests/mochitest/Makefile.in;
/cvsroot/mozilla/js/src/xpconnect/tests/mochitest/Makefile.in,v <-- Makefile.in
new revision: 1.12; previous revision: 1.11
RCS file: /cvsroot/mozilla/js/src/xpconnect/tests/mochitest/test_bug384632.html,v
Checking in js/src/xpconnect/tests/mochitest/test_bug384632.html;
/cvsroot/mozilla/js/src/xpconnect/tests/mochitest/test_bug384632.html,v <-- test_bug384632.html
initial revision: 1.1
Verified fixed for 220.127.116.11 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168pre) Gecko/2009092805 GranParadiso/3.0.15pre (.NET CLR 3.5.30729).
Verified fixed for 1.9.1 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:22.214.171.124pre) Gecko/20090924 Shiretoko/3.5.4pre (.NET CLR 3.5.30729).
This testcase doesn't run on the 1.8 branch because I get NS_ERROR_NOT_IMPLEMENTED from the document.setUserData() call. Is there some way to get the double unwrapping to happen on that branch? Or should we just not bother because that branch is missing so many wrappers anyway?
It seems that this bug is a regression from bug 384632 and that bug is not
fixed on the 1.8 branch and thus the 1.8 branch is not affected by this bug.
Created attachment 408197 [details]
testcase 2 - Arbitrary code execution
This testcase uses XSLTProcessor.setParameter(). This testcase works on
fx-3.5.3/fx-3.0.14 and is fixed on fx-3.5.4/fx-3.0.15. On SeaMonkey-1.1.18,
the same behavior as fx-3.5.4/fx-3.0.15.