1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-07-04 11:55:58 +02:00
Commit Graph

706 Commits

Author SHA1 Message Date
Vince Grassia
dd63a48176
Change versions to proper values (#8141) 2024-02-28 11:46:28 -07:00
Matt Gibson
0e9a4239a5
Fix auto biometric prompt for browser (#8137) 2024-02-28 11:46:21 -05:00
Todd Martin
668980ad38
Added DI for SsoLoginService (#8132) 2024-02-28 10:58:58 -05:00
Justin Baur
bbd50abd94
Fix DI (#8125) 2024-02-28 00:28:44 +00:00
Cesar Gonzalez
d176a678e0
[PM-5882] Adjust usage of chrome.extension.getBackgroundPage to ensure no conflicts exist due to the service worker (#8054) 2024-02-27 22:01:00 +00:00
Justin Baur
87c75e5ac8
[PM-6404] Initial Clear Events Code (#8029)
* Add New KeyDefinitionOption

* Add New Services

* Add WebStorageServiceProvider Tests

* Update Error Message

* Add `UserKeyDefinition`

* Fix Deserialization Helpers

* Fix KeyDefinition

* Add `UserKeyDefinition`

* Fix Deserialization Helpers

* Fix KeyDefinition

* Move `ClearEvent`

* Cleanup

* Fix Imports

* Remove `updateMock`

* Call Super in Web Implementation

* Use Better Type to Avoid Casting

* Better Error Docs

* Move StorageKey Creation to Function

* Throw Aggregated Error for Failures
2024-02-27 21:58:31 +00:00
Jonathan Prusik
929b5ebec3
[PM-5568] Implement Badge Settings state provider (#8112)
* create badge settings state provider

* replace state service get/set disableBadgeCounter with badge settings service equivalent

* migrate disableBadgeCounter account setting to badge settings state provider

* cleanup and address PR suggestions
2024-02-27 21:03:12 +00:00
Jason Ng
4733f45eaf
PM-4109 Vault Onboarding M2 (#7920)
Onboarding component now detects if extension is installed
2024-02-27 10:18:04 -05:00
Thomas Rittson
0a5c9d3525
[AC-2008] [AC-2122] [Pt 1] Transition PolicyService to use StateProvider (#7959)
* Delete unnecessary StateDefinition

* Add StateProvider to PolicyService

* Add new getters using StateProvider (not exposed or used yet)
2024-02-27 08:51:10 +10:00
Jonathan Prusik
c37fa9712b
[PM-6391] Add "fixed-width" class to view icons (#8019)
* add "fixed-width" class to view icons

* remove redundant class name
2024-02-26 11:53:18 -05:00
Jake Fink
1435203e12
[PM-5499] Create Auth Request Service (#8056)
* create auth request service

* copy methods from auth crypto service

* register new auth request service

* remove refs to auth request crypto service

* remove auth request crypto service

* remove passwordless login method from login strategy service

* add docs to auth request service
2024-02-26 10:07:08 -05:00
github-actions[bot]
4c0e2f01d4
Autosync the updated translations (#8088)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-02-26 12:10:16 +00:00
Jonathan Prusik
44bda82bc4
revert to old secrets masking behaviour in browser cipher edit view (#8018) 2024-02-23 17:40:27 -05:00
Cesar Gonzalez
c6b0f70a26
[PM-6078] Remove Username Masking From Inline Autofill Menu (#7951) 2024-02-23 22:01:41 +00:00
Cesar Gonzalez
ae1b6e84be
[PM-6416] Inline autofill menu does not show if the notification bar has been turned off (#8050)
* [PM-6416] Inline autofill menu does not show if notification bar turned off

* [PM-6416] Inline autofill menu does not show if the notification bar has been turned off
2024-02-23 21:59:33 +00:00
Cesar Gonzalez
b2c3ecda0f
[PM-6352] Autofill functionality not working with re-hydrated DOM elements (#8033)
* [PM-6352] Autofill functionality not working with re-hydtrated DOM elements

* [PM-6352] Autofill functionality not working with re-hydtrated DOM elements

* [PM-6352] Fixing issue found with chrome.dom.openOrClosedShadowRoot call

* [PM-6352] Implementing jest tests and adding utils methods where appropriate

* [PM-6352] Implementing jest tests and adding utils methods where appropriate
2024-02-23 19:41:26 +00:00
Cesar Gonzalez
968355d820
[PM-5881] Adjust usage of the chrome.extension.getViews API to ensure expected behavior in mv3 is not modified (#7842)
* [PM-5742] Rework Usage of Extension APIs that Cannot be Called with the Background Service Worker

* [PM-5742] Implementing jest tests for the updated BrowserApi methods

* [PM-5742] Implementing jest tests to validate logic within added API calls

* [PM-5742] Implementing jest tests to validate logic within added API calls

* [PM-5742] Fixing broken Jest tests

* [PM-5742] Fixing linter error

* [PM-5881] Adjust usage of the `chrome.extension.getViews` API to ensure expected behavior in manifest v3

* [PM-5881] Reworking how we handle early returns from `reloadOpenWindows`

* [PM-5881] Implementing jest test to validate changes within BrowserApi.reloadOpenWindows
2024-02-23 19:01:45 +00:00
Jonathan Prusik
34a8d9af86
[PM-6383] Migrate clearClipboard account setting to autofill settings service (#8022)
* migrate clearClipboard account setting to autofill settings state provider

* replace state service get/set clearClipboard with autofill settings service equivalents

* PR suggestions cleanup
2024-02-23 13:52:13 -05:00
Cesar Gonzalez
38e40a0471
[PM-5697] Capture all form data from page when selecting "New item" within the inline menu even if popout is already open (#7773)
* [PM-5679] Capture all form data from page when selecting "New item" even if popout is already open

* [PM-5679] Capture all form data from page when selecting "New item" even if popout is already open

* [PM-5697] Fixing floating promise within the handleExtensionMessage method
2024-02-23 18:27:25 +00:00
Jake Fink
a31e3bf842
Add key generation service to deps (#8070)
* add missing arg to browser crypto

* add key generation service to deps

* initialize key generation service after deps in main background
2024-02-23 11:52:50 -05:00
Cesar Gonzalez
3367339f9b
[PM-2753] Prompt to Save New Login Credentials Silently Drops Data on Network Error (#7730)
* [PM-673] Safari Notification Bar Does Not Show Folders

* [PM-673] Refactoring Context Menu Implementations to Ensure Pages with No Logins Can Dismiss Notification Bar

* [PM-673] Refactoring typing information for the LockedVaultPendingNotificationsItem typing

* [PM-673] Refactoring typing information for notification background

* [PM-673] Finishing out typing for potential extension messages to the notification bar;

* [PM-673] Working through implementation details for the notification background

* [PM-673] Fixing issues present with messaging re-implementation

* [PM-673] Fixing issue with folders not populating within Safari notification bar

* [PM-673] Fixing jest test issues present within implementation

* [PM-673] Fixing issue present with webVaultUrl vulnerability

* [PM-673] Fixing XSS Vulnerability within Notification Bar;

* [PM-5670] Putting together a partial implementation for having messages appear on network error within the notification bar

* [PM-673] Incorporating status update for when user has successfully saved credentials

* [PM-673] Incorporating status update for when user has successfully saved credentials

* [PM-5949] Refactor typing information for notification bar

* [PM-5949] Fix jest tests for overlay background

* [PM-5949] Removing unnused typing data

* [PM-5949] Fixing lint error

* [PM-5949] Adding jest tests for convertAddLoginQueueMessageToCipherView method

* [PM-5949] Fixing jest test for overlay

* [PM-5950] Fix Context Menu Update Race Condition and Refactor Implementation

* [PM-5950] Adding jest test for cipherContextMenu.update method

* [PM-5950] Adding documentation for method within MainContextMenuHandler

* [PM-5950] Adding jest tests for the mainContextMenuHandler

* [PM-673] Stripping unnecessary work for network drop issue

* [PM-673] Stripping unnecessary work for network drop issue

* [PM-2753] Prompt to Save New Login Credentials Silently Drops Data on Network Error

* [PM-673] Stripping out work done for another ticket

* [PM-5950] Removing unnecessary return value from MainContextMenuHandler.create method

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-2753] Implementing jest tests to validate logic changes

* [PM-2753] Implementing jest tests to validate logic changes

* [PM-2753] Implementing jest tests to validate logic changes

* [PM-2753] Implementing jest tests to validate logic changes

* [PM-2753] Incorporating addition of green and red borders when success or error events occur

* [PM-5950] Fixing unawaited context menu promise

* [PM-673] Merging changes in from main and fixing merge conflicts

* [PM-2753] Merging work in from main and resolving merge conflicts

* [PM-673] Fixing issue where updates to the added login were not triggering correctly

* [PM-673] Merging changes in from main and fixing merge conflicts
2024-02-23 10:50:11 -06:00
Jake Fink
fa43d8c55e
add missing arg to browser crypto (#8068) 2024-02-23 10:19:15 -05:00
Matt Gibson
9775e77079
[PM-5537] Migrate Biometric Prompts (#7771)
* Fix nextMock arguments

* Add state for biometric prompts

* Use biometric state for prompts

* Migrate biometric prompt data

* wire up biometric state to logouts

* Add migrator to migrate list

* Remove usages of prompt automatically

Explicitly list non-nulled state as intentional

* `npm run prettier` 🤖

* Fix web lock component
2024-02-23 09:21:18 -05:00
Jake Fink
19a373d87e
[PM-6211] Create key generation service (#7939)
* create key generation service

* replace old key generation service and add references

* use key generation service in key connector service

* use key generation service in send service

* user key generation service in access service

* use key generation service in device trust service

* fix tests

* fix browser

* add createKeyFromMaterial and tests

* create ephemeral key

* fix tests

* rename method and add returns docs

* ignore material in destructure

* modify test

* specify material as key material

* pull out magic strings to properties

* make salt optional and generate if not provided

* fix test

* fix parameters

* update docs to include link to HKDF rfc
2024-02-23 08:48:15 -05:00
github-actions[bot]
f6203f8f5a
Autosync the updated translations (#8059)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-02-23 12:06:19 +00:00
Cesar Gonzalez
57ac4e141b
[PM-5741] Reworking usage of window object in BrowserApi.reloadExtension method (#8021)
* [PM-5741] Reworking usage of `window` object in BrowserApi.reloadExtension method

* [PM-5741] Reworking usage of `window` object in BrowserApi.reloadExtension method
2024-02-22 22:21:24 +00:00
Matt Gibson
220268b25d
Fix #7970 browser builds (#8055)
This PR removed the setting of a session-synced subject but failed to remove session sync from the browser instance of state service.
2024-02-22 22:00:42 +00:00
Ike
23a82dfde8
[PM-6219] Fix message in duo browser 2fa component (#8053)
* update message and 2fa component

* Update messages.json

* Update two-factor.component.html

* Update messages.json

* Update two-factor.component.html
2024-02-22 12:15:47 -08:00
Matt Gibson
56bffb04bb
Ps/pm 5533/migrate decrypted user key (#7970)
* Move user key memory state to state providers

Note: state service observable change is because these updates are no longer internal to the class, but reporter directly to account service through crypto service on update of a user key

* remove decrypted user key state

Note, we're going to move the encrypted cryptoSymmetric key (and associated master key encrypted user keys)  as part of the master key service creation. Crypto service will no longer be responsible for the encrypted forms of user key.

* Deprecate notices belong on abstraction

* Allow for single-direction status updates

This is necessary since we don't want to have to guarantee that the update to logged out occurs after the update to locked.

* Remove deprecated subject

It turns out the set for cryptoMasterKey was also unused 🎉
2024-02-22 15:07:26 -05:00
Cesar Gonzalez
e894ecda25
[PM-6213] Fix Inline Autofill Menu Erasing Filled Form on Hilton.com (#7952)
* [PM-6213] Fix Inline Autofill Menu Erasing Filled Form on Hilton.com

* [PM-6213] Fixing jest test
2024-02-22 18:50:21 +00:00
Cesar Gonzalez
08b850085c
[PM-673] Safari browser extension does not list folders when offering to save new or last-used credentials (#7729)
* [PM-673] Safari Notification Bar Does Not Show Folders

* [PM-673] Refactoring Context Menu Implementations to Ensure Pages with No Logins Can Dismiss Notification Bar

* [PM-673] Refactoring typing information for the LockedVaultPendingNotificationsItem typing

* [PM-673] Refactoring typing information for notification background

* [PM-673] Finishing out typing for potential extension messages to the notification bar;

* [PM-673] Working through implementation details for the notification background

* [PM-673] Fixing issues present with messaging re-implementation

* [PM-673] Fixing issue with folders not populating within Safari notification bar

* [PM-673] Fixing jest test issues present within implementation

* [PM-673] Fixing issue present with webVaultUrl vulnerability

* [PM-673] Fixing XSS Vulnerability within Notification Bar;

* [PM-5670] Putting together a partial implementation for having messages appear on network error within the notification bar

* [PM-673] Incorporating status update for when user has successfully saved credentials

* [PM-673] Incorporating status update for when user has successfully saved credentials

* [PM-5949] Refactor typing information for notification bar

* [PM-5949] Fix jest tests for overlay background

* [PM-5949] Removing unnused typing data

* [PM-5949] Fixing lint error

* [PM-5949] Adding jest tests for convertAddLoginQueueMessageToCipherView method

* [PM-5949] Fixing jest test for overlay

* [PM-5950] Fix Context Menu Update Race Condition and Refactor Implementation

* [PM-5950] Adding jest test for cipherContextMenu.update method

* [PM-5950] Adding documentation for method within MainContextMenuHandler

* [PM-5950] Adding jest tests for the mainContextMenuHandler

* [PM-673] Stripping unnecessary work for network drop issue

* [PM-673] Stripping unnecessary work for network drop issue

* [PM-673] Stripping out work done for another ticket

* [PM-5950] Removing unnecessary return value from MainContextMenuHandler.create method

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-673] Implementing unit test coverage for newly introduced logic

* [PM-5950] Fixing unawaited context menu promise

* [PM-673] Merging changes in from main and fixing merge conflicts

* [PM-673] Fixing issue where updates to the added login were not triggering correctly

* [PM-673] Merging changes in from main and fixing merge conflicts
2024-02-21 12:47:10 -06:00
Cesar Gonzalez
91cc837be9
[PM-5839] [PM-5847] Set Bitwarden as Browser Default Autofill Bug Fixes (#8007) 2024-02-21 18:44:44 +00:00
Cesar Gonzalez
ba4e59783b
[PM-5950] Fix Context Menu Update Race Condition and Refactor Implementation (#7724)
* [PM-5949] Refactor typing information for notification bar

* [PM-5949] Fix jest tests for overlay background

* [PM-5949] Removing unnused typing data

* [PM-5949] Fixing lint error

* [PM-5949] Adding jest tests for convertAddLoginQueueMessageToCipherView method

* [PM-5949] Fixing jest test for overlay

* [PM-5950] Fix Context Menu Update Race Condition and Refactor Implementation

* [PM-5950] Adding jest test for cipherContextMenu.update method

* [PM-5950] Adding documentation for method within MainContextMenuHandler

* [PM-5950] Adding jest tests for the mainContextMenuHandler

* [PM-5950] Removing unnecessary return value from MainContextMenuHandler.create method

* [PM-5950] Fixing unawaited context menu promise
2024-02-21 17:02:15 +00:00
Cesar Gonzalez
7629652a47
[PM-5887] Refactor WebCryptoFunction to Remove Usage of the window Object in the Background Script (#7749) 2024-02-21 15:51:02 +00:00
Robyn MacCallum
c037b1dbbe
Rename jest directory to spec (#7935) 2024-02-21 09:38:27 -05:00
Andreas Coroiu
8f08ba3307
[PM-4935] Change authenticator-attachment to platform (#7946) 2024-02-21 09:32:20 +01:00
Oscar Hinton
566423925d
Upgrade typescript to 5.1 (#7917)
Co-authored-by: Cesar Gonzalez <cgonzalez@bitwarden.com>
2024-02-20 12:14:54 +01:00
Will Martin
cbcd5d9747
[CL-192][CL-193] fix virtual scroll (#7986)
* [CL-192] use sticky sidebar instead of static; remove main screen height

* [CL-193] patch cdk dialog scroll block
2024-02-19 08:52:42 -05:00
SmithThe4th
5b652092cd
[PM-5272] Migrate CollapsedGroupings to State Provider (#7954) 2024-02-16 12:53:24 -05:00
Andreas Coroiu
b0dd64bab4
[PM-4756] [PM-4755] Add BE and BS flags, and credProps (#7947)
* [PM-4756] feat: set BE and BS flags

* [PM-4755] feat: add support for credProps.rk

* [PM-4755] feat: add extension support to page-script object mapping
2024-02-16 10:55:51 +01:00
github-actions[bot]
be2f751437
Autosync the updated translations (#7974)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-02-16 08:28:37 +00:00
Oscar Hinton
02dde0c0d3
[PM-6328] Checkmarx - Resolve warnings (#7941) 2024-02-15 16:25:53 -05:00
Matt Gibson
c8c1ed42ba
[PM-5537] Remove Unecessary Biometric State (#7762)
* Create state for biometric client key halves

* Move enc string util to central utils

* Provide biometric state through service

* Use biometric state to track client key half

* Create migration for client key half

* Ensure client key half is removed on logout

* Remove account data for client key half

* Remove unnecessary key definition likes

* Remove moved state from account

* Fix null-conditional operator failure

* Simplify migration

* Remove lame test

* Fix test type

* Add migrator

* Remove state that is never read.

* Remove unnecessary biometric state

We don't need to determine platform in desktop background, it can be done in the UI at any time.

* Fix merge

* Use platform utils to identify OS desktop type
2024-02-15 15:29:29 -05:00
Cesar Gonzalez
caa998c5b1
[PM-5639] Fix Safari Window Popouts Issues When Manually Locking Extension (#7953)
* [PM-5639] Safari Browser Shows Issues When Manually Locking Extension

* [PM-5639] Safari Browser Shows Issues When Manually Locking Extension
2024-02-15 18:10:45 +00:00
Jake Fink
6562875a23
[PM-6302, PM-6303] Add duo state and connector message on browser/desktop (#7957)
* pass state for clients

* use redirect connector to set cookie with translations

* simplify duo redirect url validation
2024-02-14 18:00:38 -05:00
Jason Ng
3edf098aaf
PM-5274 Migrate Collection Service State (#7732)
* update collection service to use new state provider framework, remove stateservice from collection service, update collections state provider with migrate file and unit test
2024-02-14 17:03:03 -05:00
Ike
e5d4d4ad00
[PM-4612] [PM-6218] [PM-6219] Enable Duo redirect on Desktop Client (#7798)
* enable duo for desktop

* added missing return path in main.ts

* updated logic in component

* removed switch added await; updated logic in main.

* addressed subscription concerns in main; updated formatting in 2fa component

* Update Duo case in locales
2024-02-14 09:06:04 -08:00
Justin Baur
1ff7bdd014
[PM-6172] Run localStorage migrations for web (#7900)
* Create MigrationRunner

- Create MigrationRunner Service for running migrations in StateService
- Create web override so that migrations also run against `localStorage`

* Fix Web StateService

* Fix WebMigrationRunner

* Fix CLI

* Fix ElectronStateService

* Update Comment

* More Common Scenarios
2024-02-14 08:52:13 -05:00
Daniel James Smith
9980c3feb9
[PM-5459] Move libs/exporter to libs/tools/ (#7380)
* Move libs/exporter into libs/tools/*

Migrating all files from libs/exporter over to libs/tools/export/vault-export/vault-export-core
Rename package to vault-export-core
Fix all file paths

* Update libs and tsconfig imports

* Fix client imports

* Fix eslint, jest and package-lock.json

* Update CODEOWNERS

* Add README.md to whitelist-capital-letters

* Fix vault-export-service tests not running

* Update libs/tools/export/vault-export/README.md

Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>

* Fix types imports

* Export types from vault-export-core

* Fixed content of README

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
2024-02-13 14:22:37 -05:00
Jonathan Prusik
c65e92f769
[PM-5560] Implement Autofill Settings state provider (#7767)
* Begin migration of autofill settings

Co-authored-by: Cesar Gonzalez <cagonzalezcs@users.noreply.github.com>
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
Co-authored-by: Colton Hurst <coltonhurst@users.noreply.github.com>

* add browser dependency for AutofillSettingsService

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* update autofill settings service

* replace usages of stateService get/set autofillOnPageLoad with autofillSettingsService

* replace usages of stateService get/set autofillOnPageLoadDefault with autofillSettingsService

* replace usages of stateService get/set autoCopyTotp with autofillSettingsService

* replace usages of stateService get/set autoFillOnPageLoadCalloutIsDismissed with autofillSettingsService

* replace usages of stateService get/set activateAutoFillOnPageLoadFromPolicy with autofillSettingsService

* replace usages of get/set autoFillOverlayVisibility with autofillSettingsService

* inlineMenuVisibility should use global state

* add the AutofillSettingsService to background scripts

* fix typing

* replace additional usages of get/set autoFillOverlayVisibility and disableAutoTotpCopy with autofillSettingsService equivalents

* replace additional usages of get/set autofillOnPageLoadDefault with autofillSettingsService equivalent

* replace additional usages of get/set activateAutoFillOnPageLoadFromPolicy with autofillSettingsService equivalent

* remove additional deprecated and unused state service calls

* improve naming conventions and consistency

* fix missing mock for policy service test

* replace missing overlay background tests

* cleanup

* fix double inversion

* fix reference to wrong setter

* move handleActivateAutofillPolicy out of BrowserPolicyService

* create state migration script

* resolve linting issues

* remove migrated setting properties

* add AutofillSettingsSErvice to jslib-services

* handle conditional content script loading via autofillOnPageLoad check

* add deprecated note to getFromLocalStorage

* add jsdoc decorators to new autofill service methods

* handle undefined globalState

* move autofill settings out of BrowserPolicyService

* Move autofill settings code out of policyService

* fix tests

* fix typo in state definition

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Cesar Gonzalez <cagonzalezcs@users.noreply.github.com>
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Colton Hurst <coltonhurst@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2024-02-12 17:11:04 -05:00