Commit Graph

2625 Commits

Author SHA1 Message Date
Todd Martin
a04566ae11 chore(flags): [PM-31326] Rename ipc-channel-framework feature flag
* Rename feature flag

* Not sure what happened here.  Renaming the class.
2026-01-28 08:25:10 -05:00
Jordan Aasen
7b583aa0ec [PM-26703]- Browser - Update autofill Behavior (#18467)
* apply changes to autofill

* fix tests

* fix and simplify logic
2026-01-27 12:41:33 -08:00
Dave
c82ac0f574 feat(account-switching) [PM-5594]: Enabling account switching causes performance issues on safari (#18339)
* refactor(account-switching) [PM-5594]: Move account switching enabled flag to AccountSwitcherService to accommodate server-side feature flag.

* test(account-switching) [PM-5594]: Update tests to include ConfigService dependency for feature flag.

* refactor(account-switching) [PM-5594]: Remove compile-time account switching flags from browser.

* refactor(account-switching) [PM-5594]: Move initialization to ctor for strict.
2026-01-27 14:27:13 -05:00
Jeffrey Holland
00cf24972d [PM-28079] Add attributes to filter for the mutationObserver (#17832)
* [PM-28079] Add attributes to filter for the mutationObserver

* Update attributes based on Claude suggestions

* Updated remaining attributes

* Adjust placeholder check in `updateAutofillFieldElementData`

* Update ordering of constants and add comment

* Remove `tagName` and `value` from mutation logic

* Add new autocomplete and aria attributes to `updateActions`

* Fix autocomplete handlers

* Fix broken test for `updateAttributes`

* Order attributes for readability in `updateActions`

* Fix tests

---------

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
2026-01-27 11:28:02 -05:00
Maciej Zieniuk
9454189df5 [PM-27283] [BEEEP] Reactive availableVaultTimeoutActions$ in vault timeout settings (#17731)
* reactive `availableVaultTimeoutActions$` in vault timeout settings

* cleanup

* deprecation docs

* explicitly provided user id

* clearer mocking

* better docs
2026-01-27 10:28:13 +00:00
Leslie Tilton
60c28dd182 [PM-31203] Change Phishing Url Check to use a Cursor Based Search (#18561)
* Initial changes to look at phishing indexeddb service and removal of obsolete compression code

* Convert background update to rxjs format and trigger via subject. Update test cases

* Added addUrls function to use instead of saveUrls so appending daily does not clear all urls

* Added debug logs to phishing-indexeddb service

* Added a fallback url when downloading phishing url list

* Remove obsolete comments

* Fix testUrl default, false scenario and test cases

* Add default return on isPhishingWebAddress

* Added log statement

* Change hostname to href in hasUrl check

* Save fallback response

* Fix matching subpaths in links. Update test cases

* Fix meta data updates storing last checked instead of last updated

* Update QA phishing url to be normalized

* Filter web addresses

* Return previous meta to keep subscription alive

* Change indexeddb lookup from loading all to cursor search

* fix(phishing): improve performance and fix URL matching in phishing detection

Problem:
The cursor-based search takes ~25 seconds to scan the entire phishing database.
For non-phishing URLs (99% of cases), this full scan runs to completion every time.

Before these fixes, opening a new tab triggered this sequence:
1. chrome://newtab/ fires a phishing check
2. Sequential concatMap blocks while cursor scans all 500k+ URLs (~25 sec)
3. User pastes actual URL and hits enter
4. That URL's check waits in queue behind the chrome:// check
5. Total delay: ~50+ seconds for a simple "open tab, paste link" workflow

Even for legitimate phishing checks, the cursor search could take up to 25 seconds
per URL when the fast hasUrl lookup misses due to trailing slash mismatches.

Changes:

phishing-data.service.ts:
- Add protocol filter to early-return for non-http(s) URLs, avoiding
  expensive IndexedDB operations for chrome://, about:, file:// URLs
- Add trailing slash normalization for hasUrl lookup - browsers add
  trailing slashes but DB entries may not have them, causing O(1) lookups
  to miss and fall back to O(n) cursor search unnecessarily
- Add debug logging for hasUrl checks and timing metrics for cursor-based
  search to aid performance debugging

phishing-detection.service.ts:
- Replace concatMap with mergeMap for parallel tab processing - each tab
  check now runs independently instead of sequentially
- Add concurrency limit of 5 to prevent overwhelming IndexedDB while still
  allowing parallel execution

Result:
- New tabs are instant (no IndexedDB calls for non-web URLs)
- One slow phishing check doesn't block other tabs
- Common URL patterns hit the fast O(1) path instead of O(n) cursor scan

* performance debug logs

* disable custom match because too slow

* spec fix

---------

Co-authored-by: Alex <adewitt@bitwarden.com>
2026-01-26 17:05:42 -06:00
Nick Krantz
ad577860be [PM-28060] Remove Skeleton Feature Flag (#18456)
* remove skeleton ff

* remove unneeded templates
2026-01-26 14:01:53 -06:00
Jordan Aasen
5e8801f7ff [PM-29244] - don't use filename for download attachment label (#18444)
* don't use filename for download attachment label

* fix scroll position in browser vault

* Revert "fix scroll position in browser vault"

This reverts commit 8e415f2c89.

* fix test
2026-01-26 12:00:03 -08:00
Nik Gilmore
06c8c7316d [PM-30301][PM-30302] Use SDK for Create and Update cipher operations (#18149)
* Migrate create and edit operations to use SDK for ciphers

* WIP: Adds admin call to edit ciphers with SDK

* Add client version to SDK intialization settings

* Remove console.log statements

* Adds originalCipherId and collectionIds to updateCipher

* Update tests for new cipehrService interfaces

* Rename SdkCipherOperations feature flag

* Add call to Admin edit SDK if flag is passed

* Add tests for SDK path

* Revert changes to .npmrc

* Remove outdated comments

* Fix feature flag name

* Fix UUID format in cipher.service.spec.ts

* Update calls to cipherService.updateWithServer and .createWithServer to new interface

* Update CLI and Desktop to use new cipherSErvice interfaces

* Fix tests for new cipherService interface change

* Bump sdk-internal and commercial-sdk-internal versions to 0.2.0-main.439

* Fix linting errors

* Fix typescript errors impacted by this chnage

* Fix caching issue on browser extension when using SDK cipher ops.

* Remove commented code

* Fix bug causing race condition due to not consuming / awaiting observable.

* Add missing 'await' to decrypt call

* Clean up unnecessary else statements and fix function naming

* Add comments for this.clearCache

* Add tests for SDK CipherView conversion functions

* Replace sdkservice with cipher-sdk.service

* Fix import issues in browser

* Fix import issues in cli

* Fix type issues

* Fix type issues

* Fix type issues

* Fix test that fails sporadically due to timing issue
2026-01-26 11:43:35 -08:00
Leslie Tilton
178fd9a577 [PM-30808] Migrate Phishing Detection storage to PhishingIndexedDbService (#18517)
* Initial changes to look at phishing indexeddb service and removal of obsolete compression code

* Convert background update to rxjs format and trigger via subject. Update test cases

* Added addUrls function to use instead of saveUrls so appending daily does not clear all urls

* Added debug logs to phishing-indexeddb service

* Added a fallback url when downloading phishing url list

* Remove obsolete comments

* Fix testUrl default, false scenario and test cases

* Add default return on isPhishingWebAddress

* Added log statement

* Change hostname to href in hasUrl check

* Save fallback response

* Fix matching subpaths in links. Update test cases

* Fix meta data updates storing last checked instead of last updated

* Update QA phishing url to be normalized

* Filter web addresses

* Return previous meta to keep subscription alive
2026-01-26 10:16:40 -06:00
bitwarden-devops-bot
c2b55e31cf Bumped client version(s) 2026-01-26 16:06:39 +00:00
bw-ghapp[bot]
b744164f7a Autosync the updated translations (#18559)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-26 12:33:55 +00:00
Anders Åberg
903026b574 PM-2035: PRF Unlock (web + extension) (#16662)
* PM-13632: Enable sign in with passkeys in the browser extension

* Refactor component + Icon fix

This commit refactors the login-via-webauthn commit as per @JaredSnider-Bitwarden suggestions. It also fixes an existing issue where Icons are not displayed properly on the web vault.

Remove old one.

Rename the file

Working refactor

Removed the icon from the component

Fixed icons not showing. Changed layout to be 'embedded'

* Add tracking links

* Update app.module.ts

* Remove default Icons on load

* Remove login.module.ts

* Add env changer to the passkey component

* Remove leftover dependencies

* PRF Unlock

Cleanup and testes

* Workaround prf type missing

* Fix any type

* Undo accidental cleanup to keep PR focused

* Undo accidental cleanup to keep PR focused

* Cleaned up public interface

* Use UserId type

* Typed UserId and improved isPrfUnlockAvailable

* Rename key and use zero challenge array

* logservice

* Cleanup rpId handling

* Refactor to separate component + icon

* Moved the prf unlock service impl.

* Fix broken test

* fix tests

* Use isChromium

* Update services.module.ts

* missing , in locales

* Update desktop-lock-component.service.ts

* Fix more desktoptests

* Expect a single UnlockOption from IdTokenResponse, but multiple from sync

* Missing s

* remove catches

* Use new control flow in unlock-via-prf.component.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Changed throw behaviour of unlockVaultWithPrf

* remove timeout comment

* refactired webauthm-prf-unlock.service internally

* WebAuthnPrfUnlockServiceAbstraction -> WebAuthnPrfUnlockService

* Fixed any and bad import

* Fix errors after merge

* Added missing PinServiceAbstraction

* Fixed format

* Removed @Inject()

* Fix broken tests after Inject removal

* Return userkey instead of setting it

* Used input/output signals

* removed duplicate MessageSender registration

* nit: Made import relative

* Disable onPush requirement because it would need refactoring the component

* Added feature flag (#17494)

* Fixed ById from main

* Import feature flag from file

* Add missing test providers for MasterPasswordLockComponent

Add WebAuthnPrfUnlockService and DialogService mocks to fix test failures
caused by UnlockViaPrfComponent dependencies.

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2026-01-26 10:53:20 +01:00
Thomas Avery
bc8c925cd0 [PM-27486] Remove feature flag PM25174_DisableType0Decryption (#18413) 2026-01-23 11:09:59 -06:00
bw-ghapp[bot]
b8a8400ff7 Autosync the updated translations (#18515)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-23 10:47:46 +01:00
Jonathan Prusik
dafa00346c [PM-25615] Handle missing autofillOverlayContentService case (#18369)
* handle missing autofillOverlayContentService case

* additional checks autofillOverlayContentService
2026-01-22 22:10:47 +00:00
Nick Krantz
139a5c1eb6 avoid setting width on body when extension is within a tab (#18499) 2026-01-22 14:04:34 -06:00
Jordan Aasen
464a0427bf [PM-29816] - fix scroll position in browser vault (#18449)
* fix scroll position in browser vault

* use bitScrollLayoutHost
2026-01-21 16:28:39 -08:00
Shane Melton
21eb376b41 [PM-30906] Auto confirm nudge service fix and better nudge documentation (#18419)
* [PM-30906] Refactor AutoConfirmNudgeService to be Browser specific and add additional documentation detailing when this is necessary

* [PM-30906] Add README.md for custom nudge services
2026-01-21 15:32:58 -08:00
Jonathan Prusik
3f466c4b4c refresh top layer when top layer candidate handlers are set up (#18326) 2026-01-21 17:22:45 -05:00
Leslie Tilton
714ff1aba3 Move loading blob to memory to rxjs pipeline triggered implicitly. Removed from constructor. Added dispose to guard against memory leaks (#18480) 2026-01-21 15:09:02 -06:00
Alex
1db601b82f [PM-30718] add IndexedDB storage service for phishing data (#18344)
* add PhishingIndexedDbService for IndexedDB storage

Add a dedicated IndexedDB storage service for phishing detection data.
This service provides save, load, and clear operations using IndexedDB
instead of chrome.storage.local to avoid broadcast overhead, size
limitations, and JSON serialization cost for large datasets.

* add unit tests for PhishingIndexedDbService

Add comprehensive tests for save, load, and clear operations with
mocked IndexedDB. Tests cover success cases, error handling, and
database initialization with object store creation.

* add PhishingIndexedDbService core structure

- Add IndexedDB service with per-operation database opening
- Define PhishingUrlRecord type for row storage
- Include clearStore helper for atomic data replacement
- Service worker safe: no cached connections

* add saveUrls with chunked writes

- Add PhishingUrlRecord type for row storage
- Store each URL as individual row
- Chunk writes at 50K per transaction for responsiveness
- Atomic replacement: clear then save

* add hasUrl for lookups

- Direct IndexedDB index lookup via keyPath
- Returns boolean, handles errors gracefully

* add loadAllUrls with cursor iteration

- Cursor-based bulk load for fallback scenarios
- Memory-efficient: no intermediate array duplication
- Returns empty array on error

* add saveUrlsFromStream for memory efficiency

- Stream directly from fetch response body
- Parse newline-delimited URLs incrementally
- Reuse chunked save infrastructure

* update PhishingIndexedDbService tests

- Replace blob-based tests with row-per-URL API tests
- Test saveUrls, hasUrl, loadAllUrls, saveUrlsFromStream
- Verify chunked writes and cursor iteration
- Use stream/web ReadableStream with type cast for Node.js compatibility

* use proper URL syntax and cleanup global state

Update test data to use proper URL syntax with https:// prefix to match
real phishing.database format. Add cleanup of global.indexedDB in
afterEach to prevent test pollution.

* improve stream processing correctness and efficiency

- Move decoder.decode() before done check with { stream: !done } to flush properly
- Use array reassignment instead of splice() for O(1) chunk clearing
- Use single trim via local variable to avoid double-trim
- Centralize URL cleaning in saveChunked(), simplify saveChunk()
- Use explicit urls.length > 0 comparison

* duplicate urls test

* split final buffer by newlines
2026-01-21 12:55:14 -08:00
Jordan Aasen
d5273c7abe [PM-25082] - update browser extension widths (#18376)
* update browser extension widths

* use PopupWidthOptions where possible
2026-01-21 12:39:09 -08:00
Daniel Riera
2ce35fee99 Revert "PM-29509 [LO IMPACT] Remove @ts-strict-ignore in fido2/content/mess…" (#18478)
This reverts commit 7853ac3d9f.
2026-01-21 19:02:50 +00:00
Jason Ng
d4b8558956 [PM-30748] update archived restored toast (#18367) 2026-01-21 12:30:31 -05:00
Bryan Cunningham
1578886a5f [CL-984] link style updates (#18360)
* WIP

* add new link styles

* update link stories

* skip default screenshot as variations are covered in other stories

* updated docs and story background

* make default the default linkType value

* remove references to primary link type in CL

* use better bg colors in stories

* remove duplicate linkType

* update aria-disabled text to use new palette

* add back primary link type to story

* fix capitolization

* add backticks to variant names in docs

* remove important from link styles

* fix generic selector to find correct button

* fix capitolization

* mark variants as deprecated in docs

* fix link hover text colors
2026-01-21 10:45:49 -05:00
Jordan Aasen
7de4119d7d add prefillNameAndUriFromTab to new login button (#18305) 2026-01-20 10:12:53 -08:00
Nick Krantz
246765a1aa [PM-30453] Archive UI Updates (#18297)
* add org icon to archive list view

* update content of archive confirmation dialog

* fix typing
2026-01-19 13:25:46 -06:00
Jordan Aasen
16e6756643 [PM-27784] - remove url from more options (#18306)
* remove url from more options

* fix test
2026-01-16 12:41:27 -08:00
bw-ghapp[bot]
fc6c386340 Autosync the updated translations (#18397)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-16 13:07:29 +01:00
Nick Krantz
7150283d7c [PM-30287] Archive deletion navigation (#18213)
* add `routeAfterDeletion` for edit screen to redirect the user to the correct location after deleting an archived cipher

* use `historyGo` to preserve the back invocations

* fix duplicate import
2026-01-15 21:24:32 +00:00
Leslie Tilton
417dfdd305 [PM-30319][PM-30685] Separate and compress phishing data storage (#18337)
* Add logs for debugging in phishing-detection-settings.service

* Update phishing data service to separate web addresses from meta data for performant writes. Store compressed string instead of array

* Cleanup

* Updated test cases

* Cleanup comments

* Fix fallback encoding/decoding mismatch

* Fix type checking
2026-01-15 12:36:03 -06:00
Daniel Riera
21ea969daa [PM-29520] Remove ts strict ignore in background overlay notifications background (#18243)
* initialize timer to null

* default undefined length to 0 using nullish operator

* optional chaining and explicit null check on tab presence

* add optional chainning where relevant for sender tab id

* explicit null checks and data guards set for sender and modifyLoginData

* address feedback and make explicit undefined checks to avoid possible valid tabid rejection

* explicit tab check on setupNotificationInitTrigger
2026-01-15 12:44:23 -05:00
Daniel Riera
535b958f9e [PM-29523] Remove ts strict ignore in browser context menu clicked handler (#18264)
* early return if no cipher before switch case

* explicit null checks within switch cases for early returns

* lower cipher check and add to explicit checks

* add test cases for null values

* format spec file
2026-01-15 12:09:55 -05:00
Nick Krantz
9a22907e27 [PM-30296] Assign to Collections for Archived Ciphers (#18223)
* allow for archived ciphers to be assigned to a collection via the more options menu

* reference `userId$` directly
2026-01-15 11:08:18 -06:00
Leslie Xiong
44bdaf71b3 Desktop/pm 18769/migrate vault filters (#17919)
Migrated vault filters to new v3 vault's navigation

* Decoupled existing vault filtering from vault component by using routed params with routed-vault-filter-bridge
* Converted vault filters to standalone components
* Removed extending filter Base Components from deprecated /libs/angular library and handled logic directly
* Moved shared 'models' and 'services' directories from web-vault into /libs/vault
2026-01-15 16:17:00 +01:00
Nick Krantz
d1be3b65f7 show upgrade badge for non-premium users (#18296) 2026-01-15 08:23:52 -06:00
Jordan Aasen
c91fbb2cad [PM-26515] - Browser - Non Premium User Archived Item Flow (#16908)
* non-premium user flow  archived items

* add archived button

* update archive service

* fix add-edit component

* fix tests

* fix tests

* small fixes

* remove unused service

* fix test

* fix test

* fix test

* fix tests

* only show archived badge when user cannot archive

* update spec

* add test

* revert change to button

* use previouslyCouldArchive

* fix tests

* hide clone button when data ownership policy is enabled

* remove dupe pipe. fix logic

* change from button to span

* fix logic

* fix tests and logic

* fix tests. simplify logic

* updates to archive component

* fix archived pill logic

* fix add missing pop-out

* cleanup

* check if cipher is present in template

* remove enforceDataOwnershipPolicy obs
2026-01-14 14:38:46 -08:00
bw-ghapp[bot]
876c64684b Autosync the updated translations (#18363)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-14 19:37:36 +01:00
Daniel Riera
66819c0689 [PM-29512] Remove ts strict ignore in popup fido 2 cipher row component ts (#18064)
* last is dead code, remove completely

* pass required true so that angular enforces at runtime and run apply a definitive assignment assertion since angulars input binding is running before use
2026-01-13 14:36:52 -05:00
Daniel Riera
5ee702093c make types optional to mitigate the design inconsistency (#18072) 2026-01-13 10:14:17 -05:00
bmbitwarden
27d43c500f PM-28183 implemented new sends filter and search design (#17901)
* PM-28183 implemented new sends filter and search design

* PM-28183 resolved table issue fallout from merge conflict

* PM-28183 resolved browser paste url issue

* PM-28183 put new feature behind feature flag

* PM-28183 resolved feature flag

* PM-28183 resolved type-safe approach pr comment

* PM-28183 resolved DesktopSendUIRefresh feature flag is enabled. pr comment

* PM-28183 restored SendUIRefresh

* PM-28183 resolved query parameter subscription pr comment

* PM-28183 resolved pr comment re enum like objects

* PM-28183 resolved remove enum like objects  pr comment

* PM-28183 resolved pr comment re defining filteredSends member variable

* PM-28183 resolved pr comment re Code Duplication in syncCompleted Handler

* PM-28183 resolved pr comment re Floating Promise

* PM-28183 restored feature flag

* PM-28183 resolved pr comment re Dual Binding Pattern

* PM28183 resolved options cell button pr comment

* PM 28183 resolved pr comment re Incorrect CSS Class - Breaking Layout

* PM 28183 resolved pr comment re uery Param Update Causes Redundant Filter Application

* PM-28183 resolved lint issues

* PM 28183 resolved lint issues

* PM-28183 resolved type issue with import

* PM-28183 resolved import in failling test

* chore: rerun web build

* PM-28183 resolved build issues

* PM-28183 resolved build issues

* PM-28183 resolved lint issues
2026-01-12 13:26:50 -05:00
Jordan Aasen
0aac4cae35 allow deleting of failed decrypted cipher (#18279) 2026-01-12 09:05:20 -08:00
Leslie Tilton
6472b3689e [PM-30319][PM-30639)] Move update of phishing cache to a background process (#18302)
* Move update of phishing cache to a background process

* Move log
2026-01-12 09:17:45 -06:00
bw-ghapp[bot]
5d345d030f Autosync the updated translations (#18319)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-12 12:50:17 +01:00
Jordan Aasen
404d925f84 [PM-24560] - Add Archive UI Element to View and Edit Item Cards (#16954)
* finalize new UI elements for archive/unarchive

* add tests

* add missing service

* add tests

* updates to edit and view pages

* use structureClone

* fix lint

* fix typo

* clean up return types

* fixes to archive UI

* fix tests

* use @if and userId$
2026-01-09 16:39:22 -08:00
Jordan Aasen
1b76ce5b7c [PM-30264] - fix exact match dialog show logic (#18216)
* fix exact match dialog show logic

* fix logic for uri matching

* simplify exact match dialog show logic
2026-01-09 10:31:08 -08:00
Brandon Treston
392794b560 Ac/pm 26365 auto confirm extension one time setup dialog (#17339)
* create nav link for auto confirm in settings page

* wip

* WIP

* create auto confirm library

* migrate auto confirm files to lib

* update imports

* fix tests

* fix nudge

* cleanup, add documentation

* clean up

* cleanup

* fix import

* fix more imports

* implement one time dialog

* add tests

* design changes

* fix styles

* edit copy

* fix tests

* fix tw issue

* fix typo, add tests

* CR feedback

* more clean up, fix race condition

* CR feedback, cache policies, refactor tests

* run prettier with updated version

* clean up duplicate logic

* clean up

* add missing export

* fix test

* fix dialog position

* add tests
2026-01-09 12:41:39 -05:00
Daniel Riera
c6f704bd21 [PM-29518] Remove @ts-strict-ignore in overlay/inline-menu/content/autofill-inline-menu-content.service.ts (#18155)
* Initialized the observers directly in the constructor and removed setupMutationObserver

* explicitly initialize timers as null

* removed redundant checks for inlineMenuEnabled and tracked the button and list so TS knows they are definitely assigned

* early returns for processContainerElementMutation list and button checks, last child now has a fallback to 0 for undefined

* Update apps/browser/src/autofill/overlay/inline-menu/content/autofill-inline-menu-content.service.ts

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>

---------

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
2026-01-09 10:37:16 -05:00
bw-ghapp[bot]
f7f4ac0bcc Autosync the updated translations (#18277)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-09 15:22:56 +01:00