mirror of
https://github.com/bitwarden/clients.git
synced 2025-12-22 13:17:30 +00:00
[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:
@@ -79,4 +79,9 @@ describe("PhishingDetectionService", () => {
|
||||
// phishingDetectionSettingsService,
|
||||
// );
|
||||
// });
|
||||
|
||||
// TODO
|
||||
// it("should not enable phishing detection for safari", () => {
|
||||
//
|
||||
// });
|
||||
});
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user