Closed Bug 567175 Opened 15 years ago Closed 14 years ago

An add-on with an invalid target application id can be installed

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla2.0b1
Tracking Status
blocking2.0 --- final+

People

(Reporter: robert.strong.bugs, Assigned: mossop)

References

Details

(Whiteboard: [AddonsRewrite])

Attachments

(1 file)

With an install.rdf as follows <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>test1@updatetest.mozilla.org</em:id> <em:version>2.0</em:version> <em:bootstrap>true</em:bootstrap> <em:name>test1</em:name> <em:description>Test Description</em:description> <em:targetApplication> <Description> <em:id>undefined</em:id> <em:minVersion>1.0</em:minVersion> <em:maxVersion>99.0</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> AddonManager.getInstallForFile(xpiFile, function(install) { install.install(); }); The following was in the error console Error: this.unloadBootstrapScope is not a function Source File: file:///d:/moz/_1_mozilla-central/ff-opt/dist/bin/modules/XPIProvider.jsm Line: 3927 which should actually be self.unloadBootstrapScope
blocking2.0: --- → beta1+
Flags: in-testsuite?
Flags: in-litmus-
Whiteboard: [rewrite] → [AddonsRewrite]
actually it should be XPIProvider.unloadBootstrapScope
and it appears that fixing that also fixes bug 567184 though I could be wrong due to lack of sleep.
blocking2.0: beta1+ → final+
Depends on: 570200
It doesn't look to me like we used to validate the target application ID at all so I'm not sure we should start to do so now: http://mxr.mozilla.org/mozilla1.9.2/source/toolkit/mozapps/extensions/src/nsExtensionManager.js.in#3688 Presumably bug 567184 made it so it was no longer installing enabled yes?
Attached patch patch rev 1Splinter Review
Came across a remaining problem where if a new bootstrapped extension was detected during startup and it was incompatible its startup method would still get called. Fixed that and added tests for the startup and install while running cases.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #454283 - Flags: review?(robert.bugzilla)
Comment on attachment 454283 [details] [diff] [review] patch rev 1 Makes sense
Attachment #454283 - Flags: review?(robert.bugzilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a6pre) Gecko/20100625 Minefield/3.7a6pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: