Commit Graph

11726 Commits

Author SHA1 Message Date
Addison Beck 512c5c2837
[bug] Correct storage location of organizations (#580) 2021-12-14 22:04:39 -05:00
Jake Fink 214f82e142
send configType and redirectBehavior as int instead of string for request (#1339) 2021-12-14 13:25:48 -05:00
Daniel James Smith 3fc7dd7089
Bump electron to 16 (#579)
* Bump electron to 16.0.2

* Bump electron-update to 4.6.1
2021-12-14 19:03:54 +01:00
Addison Beck 17ae5ee57c
[Account Switching] [Refactor] Implement new account centric services (#1220)
* [chore] updated services.module to use account services

* [refactor] sorted services provided by services.module

* [chore] removed references to deleted jslib services

* [chore] used activeAccount over storageService for account level storage items

* [chore] resolved linter warnings

* Refactor activeAccountService to stateService

* [bug] Remove uneeded calls to state service on logout

This was causing console erros on logout. Clearing of data is handled fully in dedicated services, clearing them in state afterwards is essentially a redundant call.

* [bug] Add back null locked callback to VaultTimeoutService

* Move call to get showUpdateKey

* [bug] Ensure HtmlStorageService does not override StateService options and locations

* [bug] Adjust theme logic to pull from the new storage locations

* [bug] Correct theme not sticking on refresh

* [bug] Add enableFullWidth to the account model

* [bug] fix theme option empty when light is selected

* [bug] init state on application start

* [bug] Reinit state when coming back from a lock

* [style] Fix lint complaints

* [bug] Clean state on logout

* [chore] Resolved merge issues

* [bug] Correct default for enableGravitars

* Bump angular to 12.

* Remove angular.json

* Bump rxjs

* Fix build errors, remove file-loader with asset/resource

* Use contenthash

* Bump jslib

* Bump ngx-toastr

* [chore] resolve issues from merge

* [chore] resolve issues from merge

* [bug] Add missing bracket

* Use newer import syntax

* [bug] Correct service orge

* [style] Fix lint complaints

* [chore] update jslib

* [review] Address code review

* [review] Address code review

* [review] Rename providerService to webProviderService

Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Hinton <oscar@oscarhinton.com>
2021-12-14 11:10:26 -05:00
Daniel James Smith 8644d84e68
FSescure-Importer: Add support for style = global (#578)
* Fescure-Importer: Add support for style = global

* Fix linting
2021-12-14 10:22:09 +01:00
Patrick H. Lauke ba37c05d1b Add visually hidden <h1> to views that lack an overarching heading 2021-12-13 20:56:23 +00:00
Patrick H. Lauke 75878442f0 Missing class 2021-12-13 20:16:43 +00:00
Patrick H. Lauke b5f2474b68 Neutralise/reset heading styles
- make size/weight match regular text
- remove the theming, as it will inherit this anyway from its surroundings/container; having the color explicitly defined here creates issues as it's more specific otherwise and overrides the local context
2021-12-13 19:53:01 +00:00
Patrick H. Lauke ea02d228f5 Typo 2021-12-13 19:15:48 +00:00
Patrick H. Lauke 1b79812056 Straggler 2021-12-13 17:46:29 +00:00
Patrick H. Lauke 1916136f4c Merge branch 'master' into patrickhlauke-issue1987 2021-12-13 17:37:42 +00:00
Daniel James Smith 18073696d0
Bump node to v16 (#422)
* Pull in jslib

* Bump engines required to node 16 and npm 8

* Bump @types/node to 16

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Update 'setup-node' action version

* Update 'pkg' to 5.5.1

* Removed installation of npm8
npm8 is included in node v16

* Pull jslib

* Change engines to only warn on node < 16

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2021-12-13 17:18:20 +01:00
Daniel James Smith 77c107cd21
Merge pull request #2219 from bitwarden/bump-node-to-v16
Bump node to v16
2021-12-13 17:17:10 +01:00
Daniel James Smith 71075cf878
Bump node to v16 (#1336)
* Pull in jslib

* Bump engines required to node 16 and npm 8

* Bump @types/node to 16

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Removed step to install npm8
npm8 is included in node v16

* Pull jslib
2021-12-13 17:16:57 +01:00
Daniel James Smith 5865f08b37
Bump node to v16 (#1189)
* Pull in jslib

* Update .nvmrc

* Bump engines required to node 16 and npm 8

* Bump @types/node to 16
The dep on node 14.18 will get cleaned up once we bump electron

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Removed install of npm8 and renamed action step
npm8 is included in node v16

* Pull jslib
2021-12-13 17:16:44 +01:00
Addison Beck f90b3456d5
[Account Switching] [Feature] Allow clients to store data for more than one user (#491)
* [refactor] Extract, rename, and expand StorageServiceOptions

* Pulled StorageServiceOptions into its own file
* Renamed StorageServiceOptions to StorageOptions
* Pulled KeySuffixOpptions into its own file
* Converted KeySuffixOptions into an enum from a union type

* [refactor] Expand StateService into a full coverage storage proxy

* Expand StateService to allow it to manage all data points of the application state regardless of memory.
* Expand StateService to allow for storing and managing multiple accounts

* [refactor] Create helper services for managing organization and provider state data

* [refactor] Implement StateService across service layer

* Remove service level variables used for in memory data storage and replaced with calls to StateService
* Remove direct calls to StorageService in favor of using StateService as a proxy

* [feature] Implement account switching capable services across components and processes

* Replace calls to StorageService and deprecated services with calls to a StateService

* [chore] Remove unused services

Several services are no longer in use because of the expanded state service. These have simply been removed.

* [bug] Add loginRedirect to the account model

* [bug] Add awaits to newly async calls in TokenService

* [bug] Add several missing awaits

* [bug] Add state service handlers for AutoConfirmFingerprint

* [bug] Move TwoFactorToken to global state

* Update unauth-guard.service.ts

Add back return true

* [refactor] Slim down the boilerplate needed to manage options on StateService calls

* [bug] Allow the lock message handler to manipulate a specific acount

* [bug] Add missing await to auth guard

* [bug] Adjust state scope of several biometric data points

* [bug] Ensure vault locking logic can operate over non-active accounts

* [style] Fix lint complaints

* [bug] Move disableFavicon to global state

* [refactor] Remove an unecassary parameter from a StorageOptions instance

* [bug] Ensure HtmlStorageService paths are accounted for in StateService

* [feature] Add a server url helper to the account model for the account switcher

* [refactor] Remove some unused getters from the account model

* [bug] Ensure locking and logging out can function over any user

* Fix account getting set to null in getAccountFromDisk

* [bug] Ensure lock component is always working with the latest active account in state

* [chore] Update recent KeyConnector changes to use stateService

* [style] Fix lint complaints

* [chore] Resolve TokenService merge issues from KeyConnector

* [bug] Add missing service arguement

* [bug] Correct several default storage option types

* [bug] Check for the right key in hasEncKey

* [bug] Add enableFullWidth to the account model

* [style] Fix lint complaints

* [review] Revist remember email

* [refactor] Remove RememberEmail from state

* setDisableFavicon to correct storage location

* [bug] Convert vault lock loop returns into continues to not skip secondary accounts

* [review] Sorted state service methods

* [bug] Correct neverDomains type on the account model

* [review] Rename stateService.purge to stateService.clean

* [review] [refactor] Extract lock refresh logic to a load function

* [review] [refactor] Extract some timeout logic to dedicated functions

* [review] [refactor] Move AuthenticationStatus to a dedicated file

* [review] [refactor] Rename Globals to GlobalState

* [style] Fix lint complaints

* [review] Remove unused global state property for decodedToken

* [review] [bug] Adjust state scope for OrganizationInvitation

* [review] [bug] Put back the homepage variable in lock guard

* [review] Un-try-catch the window creation function

* Revert "[review] [bug] Adjust state scope for OrganizationInvitation"

This reverts commit caa4574a65d9d0c3573a7529ed2221764fd55497.

* [bug] Change || to && in recent vault timeout refactor

* [bug] Keep up with entire state in storage instead of just accounts and globals

Not having access to the last active user was creating issues across clients when restarting the process.
For example: when refreshing the page on web we no longer maintain an understanding of who is logged in.

To resolve this I converted all storage save operations to get and save an entire state object, instead of specifying accounts and globals.
This allows for more flexible saving, like saving activeUserId as a top level storage item.

* [style] Fix lint complaints

* Revert "[bug] Keep up with entire state in storage instead of just accounts and globals"

This reverts commit e8970725be472386358c1e2f06f53663c4979e0e.

* [bug] Initialize GlobalState by default

* [bug] Only get key hash from storage

* [bug] Remove settings storage location overrides

* [bug] Only save accessToken to storage

* [refactor] Remove unecassary argements from electron crypto state calls

* [bug] Ensure keys and tokens load and save to the right locations for web

* [style] Fix lint complaints

* [bug] Remove keySuffix storage option and split uses into unique methods

The keySuffix options don't work with saving serialized json as a storage object - use cases simply overwrite each other in state.
This commit breaks Auto and Biometric keys into distinct storage items and adjusts logic accordingly.

* [bug] Add default vault timeouts to new accounts

* [bug] Save appId as a top level storage item

* [bug] Add missing await to timeout logic

* [bug] Adjust state scope for everBeenUnlocked

* [bug] Clear access tokens when loading account state from disk

* [bug] Adjust theme to be a global state item

* [bug] Adjust null checking for window in state

* [bug] Correct getGlobals not pulling from the stored state item

* [bug] Null check in memory account before claiming it has a userId

* [bug] Scaffold secure storage service when building storage objects on init

* [bug] Adjusted state scope of event collection

* [bug] Adjusted state scope of vault timeout and action

* [bug] Grab account from normal storage if secure storage is requested but does not exist

* [bug] Create a State if one is requested from memory before it exists

* [bug] Ensure all storage locations are cleared on state clean

* [style] Fix lint complaints

* [bug] Remove uneeded clearing of access token

* [bug] Reset tokens when toggling

* [refactor] Split up the Account model

Until this point the account model has been very flat, holding many kinds of data.

In order to be able to prune data at appropriate times, for example clearing keys at logout without clearing QoL settings like locale,
the Account model has been divided into logical chunks.

* [bug] Correct the serverUrl helpers return

* Fix sends always coming back as empty in browser

* Get settings properly (I think)

* [bug] Fix lint error

* [bug] Add missing await to identity token refresh

This was causing weird behavior in web that was creating a lot of 429s

* [bug] Scaffold memory storage for web

Not properly creating storage objects on signin was creating weird behavior when logging out, locking, and logging back in.
Namely, encrypted data that was recently synced had nowhere to save to and was lost.

* [bug] Implement better null handling in a few places for retrieving state

* [bug] Update correct storage locations on account removal

* [bug] Added missing awaits to lock component

* [bug] Reload lock component on account switching vs. account update

* [bug] Store master keys correctly

* [bug] Move some biometrics storage items to global state

* [feature] Add platform helper isMac()

* [refactor] Comment emphasis and call order refresh

* [refactor] Remove unecassary using

* [bug] Relocate authenticationStatus check logic to component

* [bug] Stop not clearing everything on state clean

* [style] Fix lint complaints

* [bug] Correct mismatched uses of encrypted and decrypted pin states

* Add browser specific state classes and methods

* lint fixes

* [bug] Migrate existing persistant data to new schema

* [style] Fix lint complaints

* [bug] Dont clear settings on state clean

* [bug] Maintain the right storage items on logout

* [chore] resolve issues from merge

* [bug] Resolve settings clearing on lock

* [chore] Added a comment

* [review] fromatting for code review

* Revert browser state items

Co-authored-by: Robyn MacCallum <nickersthecat@gmail.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
2021-12-13 11:15:16 -05:00
Daniel James Smith 0199b638d1
Pull jslib 2021-12-13 11:50:08 +01:00
Daniel James Smith 8fc3cf50d2
Bump node to 16 and npm (#575)
* Bump engines required to node 16 and npm 8

* Bump @types/node to 16
The dep on node 14.18 will get cleaned up once we bump electron

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Remove install step for npm 8
npm v8.1.2 is included in node v16

* Rename install step

* Fixed typo
2021-12-13 11:43:10 +01:00
Daniel James Smith fd14ccc86b
Removed action step that installs npm8
npm 8 is included in node v16
2021-12-13 10:57:35 +01:00
Daniel James Smith 85491ebd18
Update requirements in README.md 2021-12-10 16:11:59 +01:00
Daniel James Smith d35d7c821e
Modify build.yml to build with node 16 and npm 8 2021-12-10 16:11:44 +01:00
Daniel James Smith 8c0b7b88f0
Bump @types/node to 16 2021-12-10 16:11:28 +01:00
Daniel James Smith a545150faa
Bump engines required to node 16 and npm 8 2021-12-10 16:07:04 +01:00
github-actions[bot] 74c9c1972f
Bumped version to 1.30.1 (#1191)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-10 10:05:34 -05:00
Daniel James Smith 43426355ec
Pull in jslib 2021-12-10 16:04:22 +01:00
Daniel James Smith e9630eeae5
Sync package-lock.json after Angular bump (#573)
* Sync package-lock.json after Angular bump

* Add form-data as dev dependency and bump typescript

* Install rxjs as dev-dep in root package.json
2021-12-10 12:50:24 +01:00
Thomas Rittson d7a72b66ff
Revert hack to fix appearance in FF sidebar (#2218)
Bug fixed upstream in FF 90
2021-12-10 18:10:39 +10:00
Thomas Rittson 56e2c86a7f
Fix name for compatibility with config.js (#1334) 2021-12-10 18:10:20 +10:00
github-actions[bot] 8fba2a693e
Autosync the updated translations (#1333)
Co-authored-by: github-actions <>
2021-12-10 01:18:21 +01:00
Oscar Hinton f582d3e7a6
Bump angular to v12 (#1325) 2021-12-09 22:12:53 +01:00
Oscar Hinton 559be594d6
Bump Angular to v12 (#2215) 2021-12-09 21:08:34 +01:00
Oscar Hinton a10259ecab
Bump angular to v12 (#1186) 2021-12-09 20:29:24 +01:00
Oscar Hinton 6a179ab2df
Bump angular to 12. (#571) 2021-12-09 15:00:26 +01:00
github-actions[bot] 3e4aa8e476
Bumped version to 1.20.0 (#421)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-08 09:48:33 -05:00
github-actions[bot] e835a53b80
Bumped version to 1.55.0 (#2214)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-08 09:03:39 -05:00
github-actions[bot] 9feb147654
Bumped version to 1.30.0 (#1187)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-08 09:02:21 -05:00
Vince Grassia 822c791cf9
Fix typo (#1185) 2021-12-08 08:48:37 -05:00
Vince Grassia 75984a2e37
Remove old 'release' ref in workflow (#1328) 2021-12-07 22:49:27 -05:00
github-actions[bot] 1cba6dc3b9
Bumped version to 2.25.0 (#1327)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-07 19:46:24 -07:00
Oscar Hinton a803d58c52
Fix components trying to use anglar bradcastservice vs interface (#1326) 2021-12-07 23:16:47 +01:00
Oscar Hinton b70d2fb3c3
Fix development build not working with bitwarden:// protocol (#1165) 2021-12-07 21:04:52 +01:00
Oscar Hinton 5fd1da0c58
Replace toaster library (#1183) 2021-12-07 20:42:31 +01:00
Oscar Hinton e4aaf81816
Replace toaster library (#2210) 2021-12-07 20:42:18 +01:00
Oscar Hinton d5c0783619
Replace toaster library (#1322) 2021-12-07 20:41:45 +01:00
Oscar Hinton a6b95b15e3
Add toastr component (#568) 2021-12-07 19:15:56 +01:00
github-actions[bot] 35a7d6434a
Autosync the updated translations (#1318)
Co-authored-by: github-actions <>
2021-12-07 17:06:08 +01:00
github-actions[bot] 2822d748f1
Autosync the updated translations (#1174)
Co-authored-by: github-actions <>
2021-12-07 17:01:42 +01:00
Daniel James Smith 86b4340bfb
Merge pull request #2200 from bitwarden/crowdin-auto-sync
Autosync Crowdin Translations
2021-12-06 21:23:04 +01:00
Oscar Hinton 17aa403461
Fix DI not working (#2211) 2021-12-06 19:56:07 +01:00
Oscar Hinton 3eb860f464
BEEEP: Refactor services DI (#2201) 2021-12-06 12:21:07 +01:00