Skip BIMI SVG errors if VMC validation succeeded

This commit is contained in:
Andris Reinman 2022-08-17 22:13:02 +03:00
parent f401957c68
commit 9c61d147df
No known key found for this signature in database
GPG key ID: DC6C83F4D584D364

View file

@ -391,10 +391,6 @@ class BimiHandler {
{ reason: authorityError, value: authorityValue, status: authorityStatus }
] = await Promise.allSettled([this.getBimiData(bimiData.location, 'location'), this.getBimiData(bimiData.authority, 'authority')]);
if (locationError) {
throw locationError;
}
if (authorityError) {
throw authorityError;
}
@ -460,6 +456,11 @@ class BimiHandler {
return authorityValue;
}
// If signed VMC was ok, then ignore any errors from regular SVG as this would not be used anyway
if (locationError) {
throw locationError;
}
return locationStatus === 'fulfilled' && locationValue;
}
}