1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-29 11:05:54 +02:00
Commit Graph

611 Commits

Author SHA1 Message Date
Jonathan Prusik
eae845d900
[PM-4260] [BEEEP] Mask TOTP seeds in cipher edit view - similar to how the password is hidden (#6649)
* PoC disallow changing masked values in edit mode and mask TOTP with password

* toggle totp seed visibility independently from password visibility in edit mode

* cleanup

* add fallback value for when a cipher returns a null value for maskedPassword

* toggle masks off for maskable login properties with no value on load

* do not show mask toggle for password or totp if no value is present
2024-01-12 22:35:30 -05:00
github-actions[bot]
84f59aa62f
Autosync the updated translations (#7534)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-12 06:49:11 +01:00
Rui Tomé
48643e45ea
[AC-1893] Removed logic to downgrade Manager roles and remove Edit/Delete any collection permissions for Flexible Collections (#7365) 2024-01-12 07:54:11 +10:00
aj-rosado
99022e2baa
Added dashed line as separator and label for common formats on format selector for import (#7432) 2024-01-11 16:24:40 +00:00
Cesar Gonzalez
1b1336d92c
[PM-5616] Remove document element mutation observer from Autofill Overlay to fix strange DOM manipulation behavior (#7464)
* [PM-5616] Remove document element mutation observer from Autofill Overlay to fix strange DOM manipulation behavior

* [PM-5616] Removing unnecessary jest tests
2024-01-11 15:54:37 +00:00
Todd Martin
7bd8b00fbf
[PM-2260] Remove TDE feature flag and all conditional logic based on it (#7352) 2024-01-10 12:33:11 -05:00
Matt Gibson
46a3834f46
Add state for everHadUserKey (#7208)
* Migrate ever had user key

* Add DI for state providers

* Add state for everHadUserKey

* Use ever had user key migrator

Co-authored-by: SmithThe4th <gsmithwalter@gmail.com>
Co-authored-by: Carlos Gonçalves <LRNcardozoWDF@users.noreply.github.com>
Co-authored-by: Jason Ng <Jcory.ng@gmail.com>

* Fix test from merge

* Prefer stored observables to getters

getters create a new observable every time they're called, whereas one set in the constructor is created only once.

* Fix another merge issue

* Fix cli background build

---------

Co-authored-by: SmithThe4th <gsmithwalter@gmail.com>
Co-authored-by: Carlos Gonçalves <LRNcardozoWDF@users.noreply.github.com>
Co-authored-by: Jason Ng <Jcory.ng@gmail.com>
2024-01-10 11:51:45 -05:00
Cesar Gonzalez
b144f5bce7
[PM-5439] TOTP to clipboard does not work with autofill overlay (#7427)
* [PM-5439] TOTP to Clipboard Does not Work with Autofill Overlay

* [PM-5439] Adding jest tests to validate totp copy action when filling using the overlay
2024-01-09 17:23:00 +00:00
Cesar Gonzalez
e3f20d81e2
[PM-5432] Overlay button iframe presents with a white background on websites that use dark mode (#7415)
* [PM-5432] Overlay button iframe presents with a white background

* [PM-5432] Adding method that allows us to update the overlay button color scheme dynamically

* [PM-5432] Adding jest tests to validate implementation changes
2024-01-08 22:15:53 +00:00
Vladan Simić
cc9a347482
[PM-5632] Update Bitwarden extension review URLs (#7470)
* Update Bitwarden extension review URLs

* Update Chrome Web Store URL

* Update browser extension links
2024-01-08 21:08:18 +01:00
github-actions[bot]
a0d2463b41
Autosync the updated translations (#7455)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-05 11:41:19 +01:00
Matt Gibson
92f593df08
Remove unnecessary complex types (#7451)
#7290 introduced these types, but during development we switched over to specifying dependencies in type parameters instead of an object. This change meant we no longer needed these `Type` or `ShapeToInstance` types, greatly simplifying the types related to derived state.
2024-01-04 16:50:55 -05:00
Justin Baur
5e11cb212d
Combined State (#7383)
* Introduce Combined State

* Cleanup Test

* Update Fakes

* Address PR Feedback

* Update libs/common/src/platform/state/implementations/default-active-user-state.ts

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

* Prettier

* Get rid of ReplaySubject reference

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2024-01-04 16:30:20 -05:00
Matt Gibson
06affa9654
Rework derived state (#7290)
* Remove derived state from state classes

* Create provider for derived state

Derived state is automatically stored to memory storage, but can be derived from any observable.

* Fixup state provider method definitions

* Test `DefaultDerivedState`

* remove implementation notes

* Write docs for derived state

* fixup derived state provider types

* Implement buffered delayUntil operator

* Move state types to a common module

* Move mock ports to centra location

* Alias DerivedStateDependency type

* Add dependencies to browser

* Prefer internal rxjs operators for ref counting

* WIP

* Ensure complete on subjects

* Foreground/background messaging for browser

Defers work for browser to the background

* Test foreground port behaviors

* Inject foreground and background derived state services

* remove unnecessary class field

* Adhere to required options

* Add dderived state to CLI

* Prefer type definition in type parameters to options

* Prefer instance method

* Implements factory methods for common uses

* Remove nothing test

* Remove share subject reference

Share manages connector subjects internally and will reuse them until
refcount is 0 and the cleanup time has passed. Saving our own reference
just risks memory leaks without real testability benefits.

* Fix interaction state
2024-01-04 14:47:49 -05:00
rr-bw
5328ffb349
refactor sort() comparison function to be consistent across browsers (#7440)
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2024-01-04 09:20:44 -08:00
Jason Ng
eebd10dfd0
linting failures from community pr update (#7434) 2024-01-03 15:36:48 -05:00
Bernd Schoolmann
1b4717a78f
[PM-3343] Capture TOTP QR codes from websites in the browser extension (#5985)
* Implement totp capture for browser extensions
2024-01-03 13:20:17 -05:00
Bitwarden DevOps
4784ab12e5
Bumped browser,cli,desktop,web version to 2024.1.0 (#7428) 2024-01-02 22:07:38 +00:00
Justin Baur
f2eea12b4f
Route on switchAccountFinish Message (#7422) 2024-01-02 16:55:42 -05:00
Andreas Coroiu
551d2c2441
[PM-5302] Refactor Passkey feature enable/disable logic (#7242)
* feat: add missing tests for `isFido2FeatureEnabled`

* feat: add user logged in check

* chore: rewrite with cartesian product

* chore: remove test

The test was more complex than the actual function, removing.

* feat: add domain exclusion

* feat: add origin equal vault case

* chore: clean up the old code from `content-secript`

* feat: return early to avoid making api calls

* fix: prettier linting

* fix: incorrect logic inversion

---------

Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2024-01-02 13:42:16 -05:00
Matt Gibson
a682f2a0ef
[PM-5468] Ensure prototypes available on memory stored objects (#7399)
* Hide account switcher in addEdit generator

* Handle AddEditCipher deserialization

* Opaque types are not serializable

* Better handle jsonification of login uris

* Ensure we don't overwrite original with clone

* Ensure cipherView prototype is always restored if it exists
2024-01-02 10:46:45 -05:00
Justin Baur
90b794c74d
[PM-5455] Listen for Finish Message (#7387)
* Listen for Finish Message

* Set Loading to false

* Have Type Reflect Possibilities
2024-01-02 10:05:26 -05:00
github-actions[bot]
526475eb40
Autosync the updated translations (#7414)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-02 11:07:11 +00:00
github-actions[bot]
7d841f959b
Autosync the updated translations (#7412)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-02 12:04:24 +01:00
rr-bw
565846f837
[PM-5430] Separate Active Account from other accounts (#7374)
* make spacing consistent between log out and lock all buttons

* update color of avatar when no active account

* separate active account from other available accounts

* remove unnecessary ng-container
2024-01-01 21:21:15 -08:00
rr-bw
ec417cf2aa
change active account status to green (#7371) 2023-12-29 10:07:53 -08:00
Daniel James Smith
4f310b6b69
Update all instances of copyright with 2023 to 2024 (#7396)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-12-29 15:28:14 +00:00
github-actions[bot]
978ad50ff6
Autosync the updated translations (#7390)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-29 00:55:23 +00:00
github-actions[bot]
2068d4879a
Autosync the updated translations (#7379)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-28 13:26:42 +00:00
rr-bw
00bb814fbe
[PM-2414] Angular 16 Upgrade - SetPinComponent (#7214)
* migrate to DialogService

* use static method

* add reactive form dependencies

* begin migrating to reactive forms

* migrate template inputs to use CL

* update set-pin.component.ts file to work with reactive forms

* migrate desktop template and class file to Dialog and ReactiveForms

* update settings page

* remove old properties

* update settings form upon dialog close

* refactor ngOnInit()

* remove duplicate validator (already have a validator in class file)
2023-12-27 10:48:06 -08:00
Cesar Gonzalez
690f4a0ae9
[PM-5134] Make Default Setting for Overlay "On Focus" (#7297) 2023-12-22 22:14:02 +00:00
Cesar Gonzalez
6ca303f4ae
[PM-4032] Detect LastPass export page and suppress download prompt (#6398)
* Import libs/importer and instantiate ImportService

* Create ImportApi and ImportService factories

* Add libs/importer to desktop

* [PM-4075] Setup Feature Flag for Browser Fileless Import

* [PM-4032] Detect Lastpass Export Page and Supress Download Prompt

* [PM-4032] Implementing jest tests for the FilelessImporterBackground class

* [PM-4075] Setup Feature Flag for Browser Fileless Import (#6391)

* [PM-4032] Implementing jest tests for the FilelessImporterBackground class

* [PM-4032] Implementing jest tests for the LpFilelessImporter class

* [PM-4032] Modifying variable name

* [PM-4032] Modifying verbiage on jest tests to feature present tense actions and updating behavior within FilelessImporterBackground to ensure logic is triggered on expected port names only

* [PM-4032] Modifying documentation present above handlePortOnConnect method

* [PM-4032] Modifying documentation present above handlePortOnConnect method

* [PM-4032] Applying early return if the user has a policy that removes the individual vault

* [PM-4032] Reverting change made to notification bar

* [PM-4032] Applying a static declaration to the filelessImporterPortNames property

* [PM-4032] Modifying test for handlPortOnConnect method to follow provided feedback

* [PM-4032] Applying feedback to jest test messages

* [PM-4032] Reworking LpFilelessImporter to simplify testing structure and leverage public facing methods rather than testing private methods

* [PM-4032] Reworking FilelessImporterBackground class

* [PM-4032] Adding implementation details that facilitate triggering onMessage listeners within a chrome.runtime.connection port

* [PM-4032] Implementing reworked jest tests for FilelessImporterBackground

* [PM-4032] Adjusting naming of jest test

* [PM-4032] Reworking test setup implementation to better fit approach discussed within overlay PR work

* [PM-4032] Running prettier

* [PM-4032] Removing added line break

* [PM-4033] Display import prompt to user (#6407)

* [PM-4033] Display Import Prompt to the User

* [PM-4033] Adding jest tests for LpFilelessImporter

* [PM-4033] Finalization of Jest tests

* [PM-4033] Finalization of Jest tests

* [PM-4033] Removing values from the whitelist capital letters file

* [PM-4033] Addressing jest test coverage in LpFilelessImporter

* [PM-4033] Addressing jest test coverage in LpFilelessImporter

* [PM-4033] Adding documentation to the added methods within the NotificationBackground class

* [PM-4033] Adding documentation to the added methods within the bar.ts content script

* [PM-4033] Removing unnecessary method within lp-fileless-importer content script

* [PM-4033] Removing method that is not currently used within FilelessImporterBackground

* [PM-4033] Adding jest tests for the implementation

* [PM-4035] Import LastPass Export Page Data (#6408)

* [PM-4035] Import LastPass Export Page Data

* [PM-4035] Import LastPass Export Page Data

* [PM-4035] Adding jest tests for the LPFilelessImporter class

* [PM-4035] Adding jest tests for the FilelessImporterBackground class

* [PM-4035] Fixing references to innerHtml and updating them to reference textContent

* [PM-4035] Removing eslint-disable and adding logging service to bar.ts

* [PM-4035] Adding typing information to LpImporter classes

* [PM-4035] Adding typing information to LpImporter classes

* [PM-4035] Adding typing information for FilelessImportType

* [PM-4035] Updating type reference for the filelessImportType

* [PM-4032] Refactoring implementation for NotificationBackground.doNotificationQueueCheck to remove repetition

* [PM-4032] Refactoring early returns within NotificationBackground

* [PM-4032] Adding context for a test case for the FilelessImporterBackground

* [PM-4032] Removing magic number by referencing the notification port within a test for cancelFilelessImport

* [PM-4032] Adding documentation to the constructor

* [PM-4032] Switching logic to use a switch statement rather than multiple if statements

* [PM-4032] Removing unnecessary early return from the mutation observer implementation within `lp-fileless-importer.ts

* [PM-4032] Adding return to the mutation observer when we have found the expected text node

* [PM-4032] Refactoring implementation of the handleMutation method

* [PM-4032] Modifying implementation for pushUnlocKVaultToQueue to send a notification message instead of adding the item to the queue

* [PM-4032] Modifying implementation for how we handle mutations within the lp-fileless-importer

* [PM-4032] Adding space between the iteration over added nodes within LpFilelessImporter.handleMutation

* [PM-4032] Reworking logic within the doNotificationCheck method to remove for loop

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-12-22 14:03:21 -06:00
Cesar Gonzalez
a1e649e809
[PM-5303] Fix issues found with SSO login (#7346)
* [PM-5303] Cannot login with SSO

* [PM-5303] Adding documentation to newly created ContentMessageHandler class

* [PM-5303] Updating manifest v3 implementation to use the newly scoped name

* [PM-5303] Adding jest tests to implementation
2023-12-22 20:00:52 +00:00
github-actions[bot]
e079fb4ab6
Autosync the updated translations (#7334)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-22 11:37:20 +01:00
Matt Gibson
bbdf704763
Target messages to only the interested ports (#7301) 2023-12-21 14:01:48 -05:00
SmithThe4th
07d224d6bc
[PM-4239] When viewing an item with a passkey, passkey is not announced by screenreader (#7154)
* Made passkey field focusable

* Made passkey field focusableand accessibilty possible for screenreaders in announcing the field
2023-12-21 10:54:54 -05:00
SmithThe4th
c1d856430a
[PM-4650] Provide user interaction for adding domain to excluded domains for passkeys (#7041)
* Added new locales text

* expose the sender url to be used in the use browser link component

* Modified use browser link to have a dropdown of two options, just once or always for this site

* modified component to use the use browser link component

* refactored method

* Made style changes and also updated the windows popout height

* ran prettier

* corrected google domain

* [PM-5281] [PM-5282] Disable User Interaction Post 'Always for this Site' Selection and Preserve Prior Exclusions (#7237)

* Added new domain alongside existing domains when saving to state

* Added an overlay whne user clicks always for this site to prevent further interaction on the page

* changed opacity

* moved overlay to fido2-use-browser-link

* removed private method and renamed variable
2023-12-20 10:38:35 -05:00
Justin Baur
c16d0b29fa
Register StateProvider in non DI clients (#7280)
* Add StateProvider and All to Browser Background

* Add State Provider and All to CLI

* Move EncryptService above its first usage
2023-12-19 20:07:16 +00:00
Bitwarden DevOps
d1ecf2e8ea
Bumped browser version to 2023.12.1 (#7285) 2023-12-19 16:24:42 +00:00
Justin Baur
07e2731a2e
Access Returned Object With Global Key (#7240) 2023-12-18 23:58:39 -05:00
Matt Gibson
87b6651f8e
[pm-5287] fix account switch logout routing (#7231)
* Navigate to home from account switcher

Also updates the main background handling of logout to either finish switch or logout, depending on which occurred

* Prefer observable guards

we were racing the account switch process on `accountService` and this async guard. It only depended on account status, which is available from `accountService`, so the correct move was to observe that status.

The unauthGuardFn allows for updating homepage depending on window state because popout windows have different nav to other locations.
2023-12-18 14:23:43 -05:00
Matt Gibson
bc1f93d098
Add missing state provider factories (#7262) 2023-12-18 12:39:05 +00:00
github-actions[bot]
c4278e7dbb
Autosync the updated translations (#7236)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-15 15:26:50 +01:00
Will Martin
e102919c2f
[CL-133] add skip links to bit-layout (#7213)
* Add light LinkType to link directive

* add skip link to bit-layout; update i18n for all apps

* install storybook interaction testing packages

* update storybook config

* add skiplink story to bit-layout

* update route and focus logic

* remove focus ring
2023-12-15 09:06:05 -05:00
Matt Gibson
4644392d5c
Clear vault filter on account switch (#7227) 2023-12-15 12:55:11 +00:00
Matt Gibson
00fd45a678
Update overlay on account switch (#7217) 2023-12-14 10:08:01 -06:00
Daniel James Smith
60d9f3d150
[PM-1925][PM-2741][AC-1334] flexible collections export page (#5759)
* Use bitTypography for page title

* Replaced app-callout with bit-callout

* Replace button with bit-button

* Update radio buttons to use CL

* Use searchable select for fileFormat dropdown

* Remove unneeded divs (old styling)

* pm-1826 remove eslint-disable tailwindcss/no-custom-classname

* Removed for-attribute from bit-labels

* Removed bitInput from bit-selects

* Removed name-attribute from bit-selects

* Make format a required field

* Removed unused dependency on cryptoService

* Remove unused dependency on BroadcasterService

* Removed dependency on window

* Moved organizationId into BaseExportComponent

* Add vaultSelector

Add organizationService as new dependency
Retrieve organizations a user has access to
Add vaultSelector dropdown
Add `export from` label
Add exportFromHint

* Removed hint as discussed by product&design

* Add function to check for import/export permission

* Export callout should listen to changes

Even though the organizationId was changed, the Input did not trigger changing the scope

* Reading FlexibleCollections feature flag to show the vault-selector on export (#7196)

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: aj-rosado <109146700+aj-rosado@users.noreply.github.com>
2023-12-14 13:55:54 +01:00
Cesar Gonzalez
12de4b1386
[PM-5245] Autofill not triggering for fields that are not visible on load (#7209) 2023-12-13 21:17:47 +00:00
Cesar Gonzalez
bf60711efe
[PM-934] Autofill not working until page has been refreshed (#6826)
* [PM-934] Autofill not working until page has been refreshed

* [PM-934] Adjusting cleanup of the messages_handler script

* [PM-934] Fixing small issue found within collection of page details

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Applying re-set changes to the autofill overlay implementation on reset of the extension

* [PM-934] Applying jest tests to added logic within AutofillOverlayContent service

* [PM-934] Fixing typo present in tabs background listener

* [PM-934] Finishing up jest tests for updated implementation

* [PM-934] Incorporating methodology for ensuring the autofill overlay updates to reflect user settings within existing tabs

* [PM-934] Refining implementation to ensure we do not unnecessarily re-inject content scripts when the autofill overlay settings change

* [PM-934] Working through jest tests for added implementation details

* [PM-934] Working through jest tests for added implementation details

* [PM-934] Finalizing jest tests for implemented logic

* [PM-5035] Refactoring method structure
2023-12-13 16:25:16 +00:00
Justin Baur
180d3a99e3
Timeout Vault of Inactive Users on System Lock (#7194) 2023-12-13 09:11:42 -05:00