mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 775327 - App ID generation and storage is unsafe [r=sicking]
This commit is contained in:
parent
c03a995def
commit
f076c96d44
@ -400,16 +400,9 @@ let DOMApplicationRegistry = {
|
||||
},
|
||||
|
||||
_nextLocalId: function() {
|
||||
// All installed apps have a localId > 1000.
|
||||
let maxLocalId = 1000;
|
||||
|
||||
for (let id in this.webapps) {
|
||||
if (this.webapps[id].localId > maxLocalId) {
|
||||
maxLocalId = this.webapps[id].localId;
|
||||
}
|
||||
}
|
||||
|
||||
return maxLocalId + 1;
|
||||
let id = Services.prefs.getIntPref("dom.mozApps.maxLocalId") + 1;
|
||||
Services.prefs.setIntPref("dom.mozApps.maxLocalId", id);
|
||||
return id;
|
||||
},
|
||||
|
||||
_appId: function(aURI) {
|
||||
|
@ -3722,3 +3722,6 @@ pref("toolkit.identity.debug", false);
|
||||
// Setting that to true grant elevated privileges to apps that ask
|
||||
// for them in their manifest.
|
||||
pref("dom.mozApps.dev_mode", false);
|
||||
|
||||
// Lowest localId for installed apps.
|
||||
pref("dom.mozApps.maxLocalId", 10000);
|
||||
|
Loading…
Reference in New Issue
Block a user