1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

3142 Commits

Author SHA1 Message Date
Addison Beck
9aa2e2d99f build: add nx configuration in libs/node (#16550) 2025-09-29 20:57:29 +02:00
Nick Krantz
c4ee2fdae2 [PM-25982] Assign to Collections - My Items (#16591)
* update cipher form to exclude my items collections

* handle default collections for assign to collections and bulk

* account for every returning true for empty arrays
2025-09-29 13:06:36 -05:00
Nik Gilmore
645478af52 [PM-18629] Hide reorder icon when displaying only one custom field (#16460) 2025-09-29 09:52:37 -07:00
Mark Youssef
018b4d5eb4 [CL-609] Close side nav when breakpoint changes (#15062)
* Close side nav when breakpoint changes

* Leverage side-nave listener instead

* Remove effect inside pipe

* Reuse isSmallScreen
2025-09-29 07:19:52 -07:00
Daniel Riera
b56c9e6c9a [PM-26078] Create admin UI for Autotype Desktop Default Setting Policy (#16573)
* PM-26078 add component and copy

* add enum

* register oss policy

* export policy definition

* update naming to match policy
2025-09-25 16:57:31 -04:00
Vicki League
e3a5111a35 [CL-849] Update and consolidate logo svgs (#16390) 2025-09-25 14:52:55 -04:00
Shane Melton
6c786ba247 [PM-25172] Do not null coalesce a login's autofillOnPageLoad setting to false. Undefined is a valid option that defaults to the extension autofill on page load setting (#16596) 2025-09-25 08:47:33 -07:00
Addison Beck
e11a6452a3 build: add nx configuration in libs/billing (#16542) 2025-09-25 09:00:36 +01:00
Addison Beck
b8d4be6cd0 build: add nx configuration in libs/vault (#16551) 2025-09-24 21:51:51 -05:00
Addison Beck
7d6ff4394d build: add nx configuration in libs/key-management (#16548) 2025-09-24 12:24:17 -05:00
Addison Beck
daae86ef57 build: add nx configuration in libs/common (#16544) 2025-09-24 13:20:42 +02:00
Addison Beck
619694238b build: add nx configuration in libs/admin-console (#16538) 2025-09-24 11:20:18 +01:00
Addison Beck
9639b72055 build: add nx configuration in libs/platform (#16546) 2025-09-23 16:33:22 -05:00
Addison Beck
092c95d11f build: add nx configuration to tools nested libraries (#16564)
Add Nx project.json configurations and test scripts to all 8 nested libraries:
- @bitwarden/send-ui
- @bitwarden/generator-core
- @bitwarden/generator-components
- @bitwarden/vault-export-core
- @bitwarden/vault-export-ui
- @bitwarden/generator-history
- @bitwarden/generator-legacy
- @bitwarden/generator-navigation

All libraries now have working nx build, nx lint, and nx test commands.
2025-09-23 13:52:17 -07:00
Addison Beck
6837e3a674 build: add nx configuration in libs/importer (#16547) 2025-09-23 13:45:51 -07:00
Bernd Schoolmann
4b73198ce5 [PM-23230] Implement KDF Change Service (#15748)
* Add new mp service api

* Fix tests

* Add test coverage

* Add newline

* Fix type

* Rename to "unwrapUserKeyFromMasterPasswordUnlockData"

* Fix build

* Fix build on cli

* Fix linting

* Re-sort spec

* Add tests

* Fix test and build issues

* Fix build

* Clean up

* Remove introduced function

* Clean up comments

* Fix abstract class types

* Fix comments

* Cleanup

* Cleanup

* Update libs/common/src/key-management/master-password/types/master-password.types.ts

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

* Update libs/common/src/key-management/master-password/services/master-password.service.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Update libs/common/src/key-management/master-password/types/master-password.types.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Add comments

* Fix build

* Add arg null check

* Cleanup

* Fix build

* Fix build on browser

* Implement KDF change service

* Deprecate encryptUserKeyWithMasterKey

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Add tests for null params

* Fix builds

* Cleanup and deprecate more functions

* Fix formatting

* Prettier

* Clean up

* Update libs/key-management/src/abstractions/key.service.ts

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

* Make emailToSalt private and expose abstract saltForUser

* Add tests

* Add docs

* Fix build

* Fix tests

* Fix tests

* Address feedback and fix primitive obsession

* Consolidate active account checks in change kdf confirmation component

* Update libs/common/src/key-management/kdf/services/change-kdf-service.spec.ts

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

* Add defensive parameter checks

* Add tests

* Add comment for follow-up epic

* Move change kdf service, remove abstraction and add api service

* Fix test

* Drop redundant null check

* Address feedback

* Add throw on empty password

* Fix tests

* Mark change kdf service as internal

* Add abstract classes

* Switch to abstraction

* use sdk EncString in MasterPasswordUnlockData

* fix remaining tests

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
2025-09-23 16:10:54 -04:00
Bryan Cunningham
9d82fc7dfc [CL-95] loading spinner (#16363)
* add spiner from previous branch

* add loading spinner to button

* Add spinner to dialog

* Add spinner to icon button

* add spinner to multi select component

* fix spinner positioning

* Add mock i18n in stories where needed

* round stroke caps. Update classes

* fix ts error

* fix broken tests

* add missing translation keys to stories

* Add mising key for layout

* Add mising key for nav group

* Add mising key for spotlight

* Add mising key for product switcher

* Add mising key for dialog service

* add translation to copy click story
2025-09-23 15:36:18 -04:00
Addison Beck
7865bb5e12 build: add nx configuration in libs/key-management-ui (#16549) 2025-09-23 20:54:40 +02:00
Mark Youssef
06d263f04a [CL-794] Fix cutoff content on smaller screens (#15644)
* Fix cutoff content on smaller screens

* Fix overlay issue by moving outside main
2025-09-23 11:26:18 -07:00
Addison Beck
1e6019c950 build: add nx configuration in libs/angular (#16539) 2025-09-23 14:20:34 -04:00
Addison Beck
5126e63399 build: add nx configuration in libs/ui/common (#16563) 2025-09-23 14:19:49 -04:00
Addison Beck
c688eed531 build: add nx configuration in libs/components (#16545) 2025-09-23 14:19:10 -04:00
Addison Beck
e1f32bdd4b build: add nx configuration in libs/dirt/card (#16562) 2025-09-23 12:13:52 -05:00
Addison Beck
c1cbdda460 build: add nx configuration in libs/auth (#16540) 2025-09-23 12:53:43 -04:00
Jordan Aasen
6024f6eef2 [PM-25879][PM-25881] - [Defect] Premium badges missing reusable component (#16461)
* clean up premium badge component

* add provider to desktop settings

* rename prop.

* add provider to send component

* fix storybook

* fix test

* move dependency to new send dropdown component

* Revert "move dependency to new send dropdown component"

This reverts commit f134526279.

* remove hasPremium
2025-09-23 09:32:45 -07:00
Jordan Aasen
f642fbc4e6 [PM-24633] - group collections by org in individual vault filters (#16480)
* group collections by org in individual vault filters

* update vault filter

* use OrganizationId

* fix tests
2025-09-23 08:50:10 -07:00
John Harrington
bb119fa315 PM-25242 added normalization for android URIs and updated test coverage (#16329) 2025-09-22 13:33:59 -07:00
Nick Krantz
2de21e607c disable autofill options when the form is disabled (#16505) 2025-09-22 11:38:28 -05:00
Addison Beck
b481063810 fix(basic-lib generator): Ensure all project.json files have a rootDir value (#16384)
* fix(nx): add rootDir to existing project.json files

The @nx/js:tsc executor was creating builds with a structural mismatch where TypeScript
output files lived in a nested src/ directory, but package.json pointed to non-existent
dist/ paths. This caused "Cannot find module" errors throughout the dependency chain.

This fix adds the rootDir configuration to flatten the build output structure and updates
all package.json main/types fields to match the actual file locations.

Changes applied systematically across all affected libraries:
• Added "rootDir": "libs/{name}/src" to project.json build options
• Updated package.json "main" from "dist/index.js" to "index.js"
• Updated package.json "types" from "dist/index.d.ts" to "index.d.ts"

* fix(nx-plugin): set rootDir for any newly generated libs

The basic-lib generator was creating new libraries with the same package.json path bugs
that we just fixed in existing libraries. Without this template fix, any newly generated
library would inherit the broken configuration pattern.

Updated the generator templates to include:
• Added rootDir configuration to project.json template
• Fixed package.json template paths to use flattened structure
• Corrected template syntax bug (missing space in <%= name %>)

This ensures all future libraries created with "nx generate @bitwarden/nx-plugin:basic-lib"
will have proper build configuration from the start, preventing regression of the
systematic rootDir issue.
2025-09-22 12:32:23 -04:00
rr-bw
3bbc6c564c feat(SSO): (Auth/[PM-22110] Remove Alternate Login Options when SSO Required (#16340)
If a user is part of an org that has the `RequireSso` policy, when that user successfully logs in we add their email to a local `ssoRequiredCache` on their device. The next time this user goes to the `/login` screen on this device, we will use that cache to determine that for this email we should only show the "Use single sign-on" button and disable the alternate login buttons.

These changes are behind the flag: `PM22110_DisableAlternateLoginMethods`
2025-09-22 08:32:20 -07:00
Rui Tomé
b455cb5986 [PM-24146] Remove stateProvider.activeUserId from ProviderService (#16258)
* Refactor provider service calls to include userId parameter

- Updated multiple components and services to pass userId when fetching provider data.
- Adjusted the ProviderService interface to require userId for get, get$, and getAll methods.
- Ensured consistent handling of userId across various components, enhancing data retrieval based on active user context.

* Remove deprecated type safety comments and use the getById utility for fetching providers.

* Update ProviderService methods to return undefined for non-existent providers

- Modified the return types of get$ and get methods in ProviderService to allow for undefined values, enhancing type safety.
- Adjusted the providers$ method to return only defined Provider arrays, ensuring consistent handling of provider data.

* Enhance provider permissions guard tests to include userId parameter

- Updated test cases in provider-permissions.guard.spec.ts to pass userId when calling ProviderService methods.
- Mocked AccountService to provide active account details for improved test coverage.
- Ensured consistent handling of userId across all relevant test scenarios.

* remove promise based api's from provider service, continue refactor

* cleanup observable logic

* cleanup

---------

Co-authored-by: Brandon <btreston@bitwarden.com>
2025-09-22 11:06:28 -04:00
Jason Ng
dbec02cf8d [PM-24533] Initialize Archive Feature (#16226)
* [PM-19237] Add Archive Filter Type (#13852)
* Browser can archive and unarchive items
* Create Archive Cipher Service
* Add flag and premium permissions to Archive 

---------

Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
Co-authored-by: Shane <smelton@bitwarden.com>
Co-authored-by: Patrick Pimentel <ppimentel@bitwarden.com>
2025-09-22 11:06:02 -04:00
Stephon Brown
c3b2c1bfc9 [PM-26012] Add Test-ids to Cart Summary Component (#16497)
* fix: update component with localized messages and data-testids

* fix: update documentation and mock localization logic

* fix: add new messages for cart-summary component
2025-09-22 14:08:26 +00:00
Alex
8531109081 [PM-25417] DIRT API Service Refactor (ADR-0005) (#16353)
* encode username for uri and add spec

* verify response from getHibpBreach method

* test/validate for BreachAccountResponse type and length instead of mock response

* - extract dirt api method out of global api service
- create new directory structure
- change imports accordingly
- extract breach account response
- put extracted code into new dirt dir

* codeowners and dep injection for new hibp service
2025-09-22 09:06:58 -05:00
Nik Gilmore
8af3e025e3 [PM-24745] Decrypt ciphers using decryptManyWithFailures from SDK (#16190)
* Add SDK call to decryptManyWithFailures instead of decryptMany

* Move logic back to decryptCiphersWithSdk

* Fix return type of decryptCiphersWithSdk

* Add unit tests for decryptCiphers()

* Add unit tests for decryptManyWithFailures

* Filter out undefined objects from failedCiphers

* Update name for failed-decryption ciphers

* Fix type checking errors in tests

* Fix tests with new changes from main

* Migrate decryptMany call to use decryptManyWithFailures

* Remove deprecated decryptMany function, along with all calls ot the function
2025-09-19 13:51:20 -07:00
Vicki League
ea5eb9aaf7 [CL-737] Migrate last copy click input to signal (#16291) 2025-09-19 11:28:07 -07:00
Alex Morask
d8339f0196 [PM-23513] Complete usage of OrganizationWarningsService (#16272)
* Use OrganizationWarningsService in AC VaultComponent

* Use OrganizationWarningsService in OrgSwitcherComponent

* Use OrganizationWarningsService in VaultFilterComponent

* Use OrganizationWarningsService in VaultComponent

* Use OrganizationWarningsService in SM OverviewComponent

* Remove TrialFlowService from unused codepaths

* Remove TrialFlowService

* Refresh free trial warning on standard payment method update

* Fix lint errors

* Fix lint errors

* Remove FF

* Fix free trial banner on deprecated ac vault component
2025-09-19 11:26:48 -05:00
Leslie Tilton
7090547cb8 [PM-19814] Phishing Detection Warning Popup UI (#16064)
* Add PhishingDetectionService

* Add a tab listener.

* Get the known phishing domain from the server

* Get the known phishing domain from the server

* Add phishing detection content script.

* Revert "Add phishing detection content script."

This reverts commit ce64d3435a.

* Fix conflicts

* Add build configs.

* Decouple the phishing detection content script logic from the rest of the app.

* move the call to background

* Add communication between the content script and background service.

* Update code to use Log service.

* Resolve conflict

* Add changes for phishing domain report

* Fix initializer order issue.

* Fix domain error.

* Account for no responses.

* Add exit functionality for onclick.

* Wrapped phishing detection feature behind feature flag (#13915)

* push changes for alert

* Removed browser logic for checking feature flag

* move the alert as dialog

* Add functionality to navigate back in history.

* [PM-19814] Add redirect to warning page when a phishing domain is detected.

* [PM-19814] Add the phishing warning page to the Angular popup.

* [PM-19814] Add functionality to display phishing host.

* [PM-19814] Add exit button and learn more link.

* [PM-19814] Add phishing detection feature flag.

* [PM-19814] Move phishing service to phishing directory

* [PM-19814] Add UI to display phishing URL.

* [PM-19814] Disable the URL input and populate it with the phishing URL.

* [PM-19814] Add phishing icon

* [PM-19814] Temporarily remove phishing reporting feature. It can be released separately in another ticket.

* [PM-19814] Clean up

* [PM-19814] Add types to the handlers.

* [PM-19814] Remove logic for handling authentication since the endpoint will be unauthenticated.

* [PM-19814] Fixed as many type issues as possible; added @ts-strict-ignore to the remaining ones.

* [PM-19814] Fix race condition in feature flag check.

* [PM-19814] Update wording for the marketing request.

* [PM-19814] Move phishing detection check from content script to webRequest.onCompleted listener.

* [PM-19814] Use webNavigation.onCompleted for redirect to ensure that the redirect only happens when they land on the page.

* [PM-19814] Remove unused code.

* [PM-19814] Fix merge conflict and update text based on product owner’s request

* [PM-19814] Fix merge conflict

* [PM-19814] Update text

* Resolve the message catalog entries

* Update file for consistent import and exports

* Update imports

* Update another import for BrowserPopupUtils

* Update the rest of the imports for BrowserPopupUtils

* Updates messages

* Rename files

* Current phishing block changes

* Use globalthis for chrome

* Add types file

* Update browser api to include tab navigation and close tab functions

* Update phishing detection to track multiple tabs and not trust info from content script

* Change chrome to browser.

* Fixed phishing detection checking previous url instead of current on navigation. Updated def flag for testing urls.

* Move phishing icon

* Fix chrome specific issues. Add comments to where BrowserApi should be used

* Fix command errors. Typecheck messages. Added guard for phishing detection messages

* Use concat map instead of merge map

* Unformat webfonts.scss file

* Fix lint and import errors

* Move phishing blocker files to dirt folder

* Rename background folder to services

* Add code ownership for phishing blocker

* Update text to use locales on phishing blocker learn more page

* Change navigation from using webapi to browser on updated event for safari support

* Update icon usage

* Fix type issues and add test file

* Fix linting error in test

---------

Co-authored-by: Jimmy Vo <huynhmaivo82@gmail.com>
Co-authored-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
Co-authored-by: Tom <144813356+ttalty@users.noreply.github.com>
2025-09-19 10:56:27 -05:00
Will Martin
cf929edb9c [Cl-726] layout spacing updates (#15979) 2025-09-19 08:32:30 -07:00
Daniel James Smith
94764467e8 [PM-25918] Move required userId for export request up to component/command level (#14391)
* Require userId for KdfConfigService

* cleanup KdfConfigService unit tests

* Move required userId for export request up to component/command level

* Fix service creation/dependency injection

* Revert changes to kdf-config.service.spec cause by a bad rebase

* Fix linting issue

* Fix tests caused by bad rebase

* Validate provided userId to equal the current active user

* Create tests for vault-export.service

Deleted old tests which since have been replaced with individual-vault-export.service.spec.ts

---------

Co-authored-by: Thomas Avery <tavery@bitwarden.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-09-19 13:39:55 +02:00
Daniel James Smith
b091719748 Introduce a stricter use of the OrganizationId type on org-vault exports (#15836)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-09-18 20:02:49 +00:00
Jimmy Vo
68d7cb4846 [PM-25922] Hotfix: Revert canManageDeviceApprovals (#16478) 2025-09-18 15:49:42 -04:00
John Harrington
376d2d8bf7 [PM-25629] Hide Chromium importer for Brave/Windows only (#16456)
* hide chromium importer for Brave/Windows only

* run cargo fmt

* address items found during review

• revert unnecessary changes to windows.rs
• handle exceptions by disabling chromium importer

* refactor filter logic
2025-09-18 12:26:56 -07:00
Jared Snider
42ec956782 feat(PlatformUtils): [Auth/PM-25817] New PlatformUtilsService.isChromium() method (#16468) 2025-09-18 14:36:35 -04:00
Jordan Aasen
4b78da1623 [PM-21794] - remove RemoveCardItemTypePolicy flag (#16450)
* remove restricted item types flag

* fix RestrictedItemTypesService constructor
2025-09-18 09:53:01 -07:00
Anders Åberg
3a2bee9444 Remove fido2 google.com workaround (#16347)
Updates the transports property in the credential creation response
to only include "internal" and "hybrid" transports.
2025-09-18 10:32:25 +02:00
Daniel James Smith
ba817f0389 [PM-25503] Use org export api on encrypted and unencrypted org exports (#16290)
* Introduce a new vault-export-api.service to replace the existing getOrganizationExport method in apiService

* Use new vault-export-api.service instead of the ApiService to retrieve organizational export data

* Remove unused method from apiService

* Register VaultExportApiService on browser

* Fxi linting issue by executing `npm run prettier`

* Rename abstraction and implementation of VaultExportApiService

* Use undefined instead of null

* Rename file of default impl of vault-export-api-service

* Fix test broken with 1bcdd80eea

* Define type for exportPromises

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-09-17 22:22:12 +02:00
Nick Krantz
200fc71c5c [PM-24305] Only enable the cipher form when it is disabled (#16259)
* only enable the cipher form when it is disabled

* switch to tracking the last emitted state for disabled rather than the form status.

The form status can be changed if any child control changes
2025-09-17 13:58:46 -05:00
Jordan Aasen
caf4ca6980 [PM-25633] - fix premium upgrade prompt (#16445)
* fix premium upgrade prompt

* use map instead of adding tap dep

* update route
2025-09-17 09:30:39 -07:00
Jordan Aasen
814305a778 [PM-24633] - group same parent name collections by org (#16404)
* key nested collections by orgId

* move groupByOrganization to separate function
2025-09-17 09:25:59 -07:00