[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>
This commit is contained in:
Leslie Tilton
2025-12-17 09:23:09 -06:00
committed by GitHub
parent e6062ec84e
commit 78f4947d00
2 changed files with 17 additions and 1 deletions

View File

@@ -79,4 +79,9 @@ describe("PhishingDetectionService", () => {
// phishingDetectionSettingsService,
// );
// });
// TODO
// it("should not enable phishing detection for safari", () => {
//
// });
});

View File

@@ -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(