Issue #1909 - Ensure UpdateChecker and UpdateParser can handle empty manifest URLs.

This commit is contained in:
Jeremy Andrews 2022-06-08 15:15:42 -05:00 committed by roytam1
commit 41b9919e7c
2 changed files with 17 additions and 0 deletions

View file

@ -611,6 +611,14 @@ function UpdateParser(aId, aUpdateKey, aUrl, aObserver) {
let requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, true);
logger.debug("Requesting " + aUrl);
if (!aUrl) {
logger.warn("Request failed: empty update manifest URL");
this._doneAt = new Error("UP_emptyManifestURL");
this.notifyError(AddonUpdateChecker.ERROR_DOWNLOAD_ERROR);
return;
}
try {
this.request = new ServiceRequest();
this.request.open("GET", this.url, true);