mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 839435 - [Packaged apps] Only allow numbers in the 'size' manifest field; r=fabrice
This commit is contained in:
parent
7d48e0b06e
commit
451869247e
@ -177,8 +177,8 @@ this.AppsUtils = {
|
||||
},
|
||||
|
||||
/**
|
||||
* from https://developer.mozilla.org/en/OpenWebApps/The_Manifest
|
||||
* only the name property is mandatory
|
||||
* From https://developer.mozilla.org/en/OpenWebApps/The_Manifest
|
||||
* Only the name property is mandatory.
|
||||
*/
|
||||
checkManifest: function(aManifest, app) {
|
||||
if (aManifest.name == undefined)
|
||||
@ -235,6 +235,14 @@ this.AppsUtils = {
|
||||
}
|
||||
}
|
||||
|
||||
// The 'size' field must be a positive integer.
|
||||
if (aManifest.size) {
|
||||
aManifest.size = parseInt(aManifest.size);
|
||||
if (Number.isNaN(aManifest.size) || aManifest.size < 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user