From 78f4947d006bc5d0d009ab6eaaba688d7b15a7c8 Mon Sep 17 00:00:00 2001 From: Leslie Tilton <23057410+Banrion@users.noreply.github.com> Date: Wed, 17 Dec 2025 09:23:09 -0600 Subject: [PATCH] [PM-25884] Disable phishing detection if safari is detected (#17655) * Disable phishing detection if safari is detected * Apply suggestion from @claude[bot] Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * Move order of safari vs account checks --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- .../services/phishing-detection.service.spec.ts | 5 +++++ .../services/phishing-detection.service.ts | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.spec.ts b/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.spec.ts index ceb18bd1573..06a37f12faa 100644 --- a/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.spec.ts +++ b/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.spec.ts @@ -79,4 +79,9 @@ describe("PhishingDetectionService", () => { // phishingDetectionSettingsService, // ); // }); + + // TODO + // it("should not enable phishing detection for safari", () => { + // + // }); }); diff --git a/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.ts b/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.ts index e04d08559ab..501dfbf7a50 100644 --- a/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.ts +++ b/apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.ts @@ -5,6 +5,7 @@ import { filter, map, merge, + of, Subject, switchMap, tap, @@ -111,7 +112,17 @@ export class PhishingDetectionService { .messages$(PHISHING_DETECTION_CANCEL_COMMAND) .pipe(switchMap((message) => BrowserApi.closeTab(message.tabId))); - const phishingDetectionActive$ = phishingDetectionSettingsService.on$; + // Phishing detection is unavailable on Safari due to platform limitations + if (BrowserApi.isSafariApi) { + logService.debug( + "[PhishingDetectionService] Disabling phishing detection service for Safari.", + ); + } + + // Watching for settings changes to enable/disable phishing detection + const phishingDetectionActive$ = BrowserApi.isSafariApi + ? of(false) + : phishingDetectionSettingsService.on$; const initSub = phishingDetectionActive$ .pipe(