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

133 Commits

Author SHA1 Message Date
Bernd Schoolmann
eb4fd42153 [PM-28446] Log package types (#17496)
* User agent

* Update to use header

* Fix build on cli

* Replace unsandboxed with unknown

* Apply feedback

* Prevent sending null values
2025-11-27 00:22:59 +01:00
Jason Ng
fd1155ae58 [PM-27103] Add URL Check to Send (#17056)
* add dangerousPatters check to api service
2025-11-18 12:38:18 -05:00
Andreas Coroiu
48fb8b2bfe [PM-25250] Prevent configuration and access of self hosted urls over http (#17095)
* feat: ban urls not using https

* feat: add exception for dev env

* feat: block fetching of insecure URLs

* feat: add exception for dev env

* feat: block notifications from using insecure URL

* fix: bug where submission was possible regardless of error

* feat: add exception for dev env

* fix: missing constructor param
2025-10-31 08:12:44 +01:00
Tom
81e9015b5b Adding include my items to the services and reports (#16987) 2025-10-23 12:54:52 -04:00
Dave
7943066724 Reapply feat(two-factor-api-service) [PM-26465]: (Refactor) Two-Factor API Service (#16856) (#16884)
This reverts commit d082d336e7.
Feature branch was accidentally merged before QA testing completed.
2025-10-15 16:24:56 -04:00
Dave
d082d336e7 Revert "feat(two-factor-api-service) [PM-26465]: (Refactor) Two-Factor API Se…" (#16856)
This reverts commit 886003ba88.
2025-10-13 14:22:49 -04:00
Dave
886003ba88 feat(two-factor-api-service) [PM-26465]: (Refactor) Two-Factor API Service (#16747)
* feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiServiceAbstraction.

* feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiService implementation.

* feat(two-factor-api-service) [PM-26465]: Add test suite for TwoFactorApiService.

* feat(two-factor-api-service) [PM-26465]: Replace ApiService dependencies with TwoFactorApiService for all refactored methods.

* feat(two-factor-api-service) [PM-26465]: Finish removal of Two-Factor API methods from ApiService.

* fix(two-factor-api-service) [PM-26465]: Correct endpoint spelling.

* feat(two-factor-api-service) [PM-26465]: Update dependency support for CLI.

* fix(two-factor-api-service) [PM-26465]: Update tests/deps for corrected spelling.

* feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiService to Browser services module.

* fix(two-factor-api-service) [PM-26465]: Re-spell dependencies to take *Abstraction throughout, move to JslibServices module for cleaner importing across clients.

* feat(two-factor-api-service) [PM-26465]: Move new services to a feature area, rename abstract and concrete/default.

* feat(two-factor-api-service) [PM-26465]: Move the feature area to common/auth, not auth/common.

* feat(two-factor-api-service) [PM-26465]: Remove now-unneeded include from auth/tsconfig.
2025-10-13 12:48:25 -04:00
cd-bitwarden
cb20889a94 [SM-1489] machine account event logs (#15997)
* Adding enums for additional event logs for secrets

* updating messages

* Updating messages to be consistent for logs

* Displaying project logs, and fixing search query param searching in projects list, having deleted log for secrets and projects not show as a link

* Viewing secret and project event logs in event modal, adding to the context menu for secrets and projects the ability to view the logs if user has permission. Restricting logs to SM projs and Secs if the logged in user has event log access but not SM access.

* lint

* Lint Fixes

* fix to messages file

* fixing lint

* Adding machine account event logs

* lint fix

* Update event.service.ts

* removing duplicate function issue from merge

* Update service-accounts-list.component.ts

* fixing message

* Fixes to QA bugs

* lint fix

* linter for messages is annoying

* lint
2025-10-03 09:52:00 +02:00
Alex Morask
d9d8050998 [PM-25463] Work towards complete usage of Payments domain (#16532)
* Use payment domain

* Fixing lint and test issue

* Fix organization plans tax issue

* PM-26297: Use existing billing address for tax calculation if it exists

* PM-26344: Check existing payment method on submit
2025-10-01 10:26:47 -05: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
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
Alex
3bc3bef50b [PM-814] Breach Report Escape Characters (#16264)
* encode username for uri and add spec

* verify response from getHibpBreach method

* test/validate for BreachAccountResponse type and length instead of mock response
2025-09-08 07:23:29 -07:00
Justin Baur
73e8532ecc feat(tokens): Allow Inactive user authenticated API calls 2025-09-03 10:09:02 -04:00
Brandon Treston
28b5a2bb5e [PM-22717] Expose DefaultUserCollectionEmail to clients (#15643)
* enforce restrictions based on collection type, set default collection type

* fix ts strict errors

* fix default collection enforcement in vault header

* enforce default collection restrictions in vault collection row

* enforce default collection restrictions in AC vault header

* enforce default collection restriction for select all

* fix ts strict error

* switch to signal, fix feature flag

* fix story

* clean up

* remove feature flag, move check for defaultCollecion to CollecitonView

* fix test

* remove unused configService

* fix test: coerce null to undefined for collection Id

* clean up leaky abstraction for default collection

* fix ts-strict error

* fix parens

* add new property to models, update logic, refactor for ts-strict

* fix type

* rename defaultCollection getter

* clean up

* clean up

* clean up, add comment, fix submit

* add comment

* add feature flag

* check model for name

* cleanup readonly logic, remove featureflag logic

* wip

* refactor CollectionRequest into Create and Update models

* fix readonly logic

* cleanup

* set defaultUserCollectionEmail in decryption from Collection

* split save into update/create methods

* fix readonly logic

* fix collections post and put requests

* add defaultUserCollection email to model when submitting collection dialog
2025-08-26 11:42:52 -04:00
cd-bitwarden
ad145fc4ff [SM-1274] Add Project Events to the Log List in Admin Console (#15442)
* Adding enums for additional event logs for secrets

* updating messages

* Updating messages to be consistent for logs

* Displaying project logs, and fixing search query param searching in projects list, having deleted log for secrets and projects not show as a link

* Viewing secret and project event logs in event modal, adding to the context menu for secrets and projects the ability to view the logs if user has permission. Restricting logs to SM projs and Secs if the logged in user has event log access but not SM access.

* lint

* Lint Fixes

* fix to messages file

* fixing lint

* Bug fix, make sure event logs related to service accounts are still links that take you to the object

* removing unused import
2025-08-20 10:45:58 -04:00
bitwarden-charlie
7835d01456 chore/SRE-583 Deprecate usage of Auth-Email Header (#14418)
* chore/SRE-583 Deprecate usage of Auth-Email Header

* SRE-583 additional cleanup

* SRE-583 removed Utils

* SRE-583 formatting

---------

Co-authored-by: sneakernuts <671942+sneakernuts@users.noreply.github.com>
2025-08-08 08:26:03 -06:00
Todd Martin
d1c6b334b1 feat(DuckDuckGo): [PM-9388] Add new device type for DuckDuckGo browser
* Add new device type for DuckDuckGo browser

* Added feature support property for sync domains

* Added new features

* Added isDuckDuckGo() to CLI

* Addressed PR feedback.

* Renamed new property

* Fixed rename that missed CLI.
2025-07-03 11:27:28 -04:00
Todd Martin
473ab3a1f7 feat(feature-flags): Add Device-Identifier header to unauthenticated requests
* Added header to unauthenticated requests

* Added comment
2025-06-26 07:27:50 -04:00
Rui Tomé
fa23a905e0 [PM-22442] Refactor ApiService: Remove unused methods for collection user management (#15208) 2025-06-24 10:21:35 +01:00
Jordan Aasen
f9b31d2906 remove legacy attachment upload (#15237) 2025-06-18 15:27:34 -07:00
Jordan Aasen
4223a7e2d7 [PM-22344] - update response type for shareManyWithServer (#15061)
* update response type for shareManyWithServer

* build new ListResponse
2025-06-03 13:59:34 -07:00
Jordan Aasen
6bb484dc23 [PM-22204] - update revision date from server response in shareManyWithServer (#15016)
* update revision date from server response in shareManyWithServer

* return CipherResponse instead of Record
2025-06-02 09:06:03 -07:00
Addison Beck
56a3b14583 Introduce eslint errors for risky/circular imports (#14804)
* first draft at an idea dependency graph

* ignore existing errors

* remove conflicting rule regarding internal platform logic in libs

* review: allow components to import from platform
2025-05-23 08:01:25 -04:00
cyprain-okeke
5fb46df341 [PM 21106]Remove button not responsive for admin Console Remove Sponorship (#14743)
* Resolve the remove button inactive

* Resolve the lint error
2025-05-13 16:49:06 +01:00
Justin Baur
1b756df749 [PM-14484] ApiService showing html in error message (#14658)
* Make ApiService more testable

* Add ApiService tests

* Switch to only reading text/plain content
2025-05-09 20:21:25 -04:00
Todd Martin
4191bb9533 chore(captcha): [PM-15162] Remove handling of captcha enforcement and bypass token
* Removed captcha references.

* Removed connectors from webpack

* Fixed extra parameter.

* Resolve merge conflicts.

* Fixed extra argument.

* Fixed failing tests.

* Fixed failing test.

* Accessibility cookie cleanup

* Cleaned up accessibility component.

* Deleted old registration endpoint

* Remove unused register request object.

* Fixed merge error that changed font family.

* Fixed formatting from merge.

* Linting
2025-05-09 10:44:11 -04:00
Brandon Treston
fd43222938 [PM-19383] admins unable to download attachments (#14363)
* add admin support for downloading attachments

* fix delete and upload

* fix delete admin to return a response

* fix upload

* add missing param

* use getCipherAdmin

* fix cli
2025-05-05 13:36:49 -04:00
cyprain-okeke
28f00e5533 [PM-21109] Resend invitation button not responsive when clicked (#14603)
* Resolve the resend email bug

* Resolve the resend invite option for Active sponsorship

* Resolve the lint error

* Rename the o variable  properly
2025-05-05 16:19:11 +01:00
Todd Martin
4537642003 chore(2fa recovery code): [PM-18175] Remove feature flag and old recovery flow 2025-03-17 16:22:25 -04:00
Ike
2d4ffe6eb6 Revert "[PM-19209] Update New device verification error" (#13843)
This reverts commit 31b1ee4f84.
2025-03-14 13:05:57 -04:00
Thomas Rittson
0c507f54f6 [PM-13323] Move remaining collection code to AC Team (#13731) 2025-03-13 17:18:47 -04:00
Ike
31b1ee4f84 [PM-19209] Update New device verification error
fix : updating error string for new device response from server to match comparison.
2025-03-13 14:48:16 -04:00
Thomas Avery
7e96b7a9a6 [PM-17670] Move KeyConnectorService to KM ownership (#13277)
* Move KeyConnectorService to KM ownership

* Add to codecov

* Move key connector request models
2025-03-13 09:46:01 -05:00
Alec Rippberger
942b80e5d2 refactor(auth): [PM-9724] remove LoginViaAuthRequestComponentV1 and related functionality
- Remove deprecated LoginViaAuthRequestComponentV1 component
- Clean up related ApiService functionality
- Remove orphaned translation messages
- Remove unused CSS styles

Jira PM-9724
2025-03-12 16:40:05 -05:00
rr-bw
e268055dc1 feature(set-change-password): [Auth/PM-17648] Create MasterPasswordApiService (#13552)
Creates a MasterPasswordApiService to house our API calls related to setting and changing a master password.
2025-03-12 11:33:44 -07:00
Jake Fink
43f5423e78 [PM-12606] Move Vault Timeout and Vault Timeout Settings to KM (#13405)
* move vault timeout and vault timeout settings to km

* move browser vault timeout service to km

* fix cli import

* fix imports

* fix some relative imports

* use relative imports within common

* fix imports

* fix new imports

* Fix new imports

* fix spec imports
2025-02-28 09:55:03 -05:00
Todd Martin
ec488e4f84 [PM-18664] Prevent display of Auth Request notification on triggering device (#13597)
* Send device identifier in header.

* Added null to apiUrl property for strict typing.

* Added null to apiUrl for strict typing.
2025-02-27 10:00:52 -05:00
Nick Krantz
7c2bf504a3 [PM-11249] Sync attachment updates across platforms (#11758)
* update extension refresh form when an attachment is added or removed

- This is needed because the revision date was updated on the server and the locally stored cipher needs to match.

* receive updated cipher from delete attachment endpoint

- deleting an attachment will now alter the revision timestamp on a cipher.

* patch the cipher when an attachment is added or deleted

* migrate vault component to use the `cipherViews$` observable

* reference `cipherViews$` on desktop for vault-items

- This avoid race conditions where ciphers are cleared out in the background. `cipherViews` should always emit the latest views

* return CipherData from cipher service so that consumers have the updated cipher right away

* use the updated cipher from attachment endpoints to refresh the details within the add/edit components on desktop
2025-01-28 10:01:23 -06:00
Timshel
9a5ebf94a0 Prevent parallel refreshToken calls (#10799)
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
Co-authored-by: Patrick-Pimentel-Bitwarden <ppimentel@bitwarden.com>
2025-01-24 14:23:22 -05:00
Alec Rippberger
aa1c0ca0ee feat(auth): [PM-8221] implement device verification for unknown devices
Add device verification flow that requires users to enter an OTP when logging in from an unrecognized device. This includes:

- New device verification route and guard
- Email OTP verification component
- Authentication timeout handling

PM-8221
2025-01-23 12:57:48 -06:00
Shane Melton
5e1d5bad07 [PM-14416] Risk Insights - Initial security task service (#12446)
* [PM-14416] Add initial SecurityTask models and enums

* [PM-14416] Add support for PATCH request method and 204 No Content response

* [PM-14416] Add initial task service abstraction

* [PM-14416] Add SecurityTask state/key definitions

* [PM-14416] Add DefaultTaskService implementation

* [PM-14416] Add DefaultTaskService tests

* [PM-14416] Add better null checking to new models

* [PM-14416] Improve null value filtering for task service
2025-01-21 09:50:50 -08:00
Jonas Hendrickx
c6a3055184 [PM-14894] Remove old sales tax rates references (#12784) 2025-01-20 16:51:57 +01:00
Tomi Belan
7a5f3b2dd4 Fix reporting of server-side errors in "bw sync". (#6855)
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2024-12-12 13:01:03 -05:00
Matt Gibson
9c1e2ebd67 Typescript-strict-plugin (#12235)
* Use typescript-strict-plugin to iteratively turn on strict

* Add strict testing to pipeline

Can be executed locally through either `npm run test:types` for full type checking including spec files, or `npx tsc-strict` for only tsconfig.json included files.

* turn on strict for scripts directory

* Use plugin for all tsconfigs in monorepo

vscode is capable of executing tsc with plugins, but uses the most relevant tsconfig to do so. If the plugin is not a part of that config, it is skipped and developers get no feedback of strict compile time issues. These updates remedy that at the cost of slightly more complex removal of the plugin when the time comes.

* remove plugin from configs that extend one that already has it

* Update workspace settings to honor strict plugin

* Apply strict-plugin to native message test runner

* Update vscode workspace to use root tsc version

* `./node_modules/.bin/update-strict-comments` 🤖

This is a one-time operation. All future files should adhere to strict type checking.

* Add fixme to `ts-strict-ignore` comments

* `update-strict-comments` 🤖

repeated for new merge files
2024-12-09 20:58:50 +01:00
rr-bw
9429ae1d06 feat(auth): [PM-9723] Refresh LoginViaAuthRequestComponent (#11545)
Creates a refreshed and consolidated LoginViaAuthRequestComponent for use on all visual clients, which will be used when the UnauthenticatedExtensionUIRefresh feature flag is on.
2024-11-19 14:53:01 -08:00
cyprain-okeke
c17f582768 [PM-13345]Add the new policy (#11894)
* Add the new policy

* Add the free family policy behind flag

* Patch build process

* Revert "Patch build process"

This reverts commit 4024e974b1.

* [PM-13346] Email notification impacts (#11967)

* Changes error notification for disabled offer

* Add the feature to the change

* Add the missing dot

* Remove the authenicated endpoint

* Add the changes for error toast

* Resolve the lint issue

* rename file a correctly

* Remove the floating promise comments

* Delete unwanted comments

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-11-19 17:36:52 +01:00
Todd Martin
f9098558a6 Update Is-Prerelease header to be integer instead of string (#11909) 2024-11-07 16:00:48 -05:00
Nick Krantz
b42741f313 [PM-13839][PM-13840] Admin Console Collections (#11649)
* allow admin console to see all collections when viewing a cipher

- When "manage all" option is selected all collections should be editable

* update cipher form service to use admin endpoints

* when saving a cipher, choose to move to collections first before saving any other edits

- This handles the case where a cipher is moving from unassigned to assigned and needs to have a collection to save any other edits

* set admin flag when the original cipher has zero collections

- handling the case where the user  un-assigns themselves from a cipher

* add check for the users ability to edit items within the collection

* save cipher edit first to handle when the user unassigns themselves from the cipher

* update filter order of collections

* use cipher returned from the collections endpoint rather than re-fetching it

* fix unit tests by adding canEditItems

* re-enable collection control when orgId is present

* fetch the updated cipher from the respective service for editing a cipher
2024-11-07 10:22:35 -06:00
Justin Baur
1e2a51a56b Reverse Arguments (#11870) 2024-11-05 13:55:31 -05:00
Todd Martin
eb95d437a8 [PM-13804] Add new Is-Prerelease header to requests (#11605)
* Added new Is-Beta header

* Updated beta to prerelease
2024-11-05 12:01:29 -05:00