1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-31 00:33:33 +00:00

return null on checksum match

This commit is contained in:
Alex
2026-01-09 15:21:43 -05:00
parent 92190d734c
commit e940a96d2a

View File

@@ -152,13 +152,11 @@ export class PhishingDataService {
const applicationVersion = await this.platformUtilsService.getApplicationVersion();
// If checksum matches, return existing data with new timestamp & version
// If checksum matches, skip state write to avoid expensive Set rebuild
const remoteChecksum = await this.fetchPhishingChecksum(this.resourceType);
if (remoteChecksum && prev.checksum === remoteChecksum) {
this.logService.info(
`[PhishingDataService] Remote checksum matches local checksum, updating timestamp only.`,
);
return { ...prev, timestamp, applicationVersion };
this.logService.info(`[PhishingDataService] Checksum match, skipping update.`);
return null;
}
// Checksum is different, data needs to be updated.