Closed
Bug 743412
Opened 13 years ago
Closed 13 years ago
navigator.mozApps.install -- treatment of origin
Categories
(Web Apps :: HTML, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: onecyrenus, Assigned: ianbicking)
Details
(Whiteboard: [mozApps API 1.0])
If a manifest does not have an origin, it is expected that the app can only be installed from the domain of the app.
Basically the rules below are slightly different. Looking at the case where there is no installs_allowed_from, the html/js code will not allow you to install the app, but the ff central code will allow you to install the app.
html / js code:
if (manifestToInstall && manifestToInstall.installs_allowed_from) {
var iaf = manifestToInstall.installs_allowed_from;
for (var i = 0; i < iaf.length; i++) {
if (iaf[i] === '*' || urlMatchesDomain(installOrigin, iaf[i])) {
return true;
}
}
ff central code dom/base/Webapps.js:
if (aManifest.installs_allowed_from) {
ok = false;
aManifest.installs_allowed_from.forEach(function(aOrigin) {
if (aOrigin == "*" || aOrigin == aInstallOrigin)
ok = true;
});
return ok;
}
Reporter | ||
Updated•13 years ago
|
Whiteboard: [mozApps API 1.0]
Updated•13 years ago
|
Whiteboard: [mozApps API 1.0] → [mozApps API 1.0] [marketplace-beta?]
Assignee | ||
Comment 1•13 years ago
|
||
The code looks logically the same to me. Can you give an example of a manifest where they act differently?
Assignee | ||
Comment 2•13 years ago
|
||
Looking at the larger context of the code I see what you mean. Fixed in the HTML implementation in https://github.com/mozilla/openwebapps/commit/7cf0313513f9bab8cc963a96ebe382ae469616bf (not deployed yet)
Assignee: nobody → ianb
Component: DOM: Mozilla Extensions → HTML
Product: Core → Web Apps
QA Contact: general
Updated•13 years ago
|
Whiteboard: [mozApps API 1.0] [marketplace-beta?] → [mozApps API 1.0]
Reporter | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•13 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•