mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 831412 - Disable support for installing certified-level apps through the remote debugger protocol in production builds r=cjones
This commit is contained in:
parent
3e021efaaa
commit
0cd68ef2f9
@ -213,6 +213,24 @@ WebappsActor.prototype = {
|
||||
}
|
||||
|
||||
let appType = aRequest.appType || Ci.nsIPrincipal.APP_STATUS_INSTALLED;
|
||||
|
||||
// Check that we are not overriding a preinstalled application.
|
||||
let reg = DOMApplicationRegistry;
|
||||
if (appId in reg.webapps && reg.webapps[appId].removable === false) {
|
||||
return { error: "badParameterType",
|
||||
message: "The application " + appId + " can't be overriden."
|
||||
}
|
||||
}
|
||||
|
||||
// In production builds, don't allow installation of certified apps.
|
||||
#ifdef MOZ_OFFICIAL
|
||||
if (appType == Ci.nsIPrincipal.APP_STATUS_CERTIFIED) {
|
||||
return { error: "badParameterType",
|
||||
message: "Installing certified apps is not allowed."
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
let appDir = FileUtils.getDir("TmpD", ["b2g", appId], false, false);
|
||||
|
||||
if (!appDir || !appDir.exists()) {
|
||||
|
Loading…
Reference in New Issue
Block a user