@bitwarden/cli 2025.1.0 → 2025.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bw.js +812 -431
- package/build/bw.js.map +1 -1
- package/package.json +2 -2
package/build/bw.js
CHANGED
|
@@ -2193,6 +2193,7 @@ class EditCommand {
|
|
|
2193
2193
|
this.apiService = apiService;
|
|
2194
2194
|
this.folderApiService = folderApiService;
|
|
2195
2195
|
this.accountService = accountService;
|
|
2196
|
+
this.activeUserId$ = this.accountService.activeAccount$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((a) => a === null || a === void 0 ? void 0 : a.id));
|
|
2196
2197
|
}
|
|
2197
2198
|
run(object, id, requestJson, cmdOptions) {
|
|
2198
2199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -2268,9 +2269,8 @@ class EditCommand {
|
|
|
2268
2269
|
}
|
|
2269
2270
|
cipher.collectionIds = req;
|
|
2270
2271
|
try {
|
|
2271
|
-
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.firstValueFrom)(this.accountService.activeAccount$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((a) => a === null || a === void 0 ? void 0 : a.id)));
|
|
2272
2272
|
const updatedCipher = yield this.cipherService.saveCollectionsWithServer(cipher);
|
|
2273
|
-
const decCipher = yield updatedCipher.decrypt(yield this.cipherService.getKeyForCipherKeyDecryption(updatedCipher, activeUserId));
|
|
2273
|
+
const decCipher = yield updatedCipher.decrypt(yield this.cipherService.getKeyForCipherKeyDecryption(updatedCipher, yield (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.firstValueFrom)(this.activeUserId$)));
|
|
2274
2274
|
const res = new _vault_models_cipher_response__WEBPACK_IMPORTED_MODULE_9__/* .CipherResponse */ .N(decCipher);
|
|
2275
2275
|
return _models_response__WEBPACK_IMPORTED_MODULE_7__/* .Response */ .Y.success(res);
|
|
2276
2276
|
}
|
|
@@ -2281,18 +2281,18 @@ class EditCommand {
|
|
|
2281
2281
|
}
|
|
2282
2282
|
editFolder(id, req) {
|
|
2283
2283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2284
|
-
const
|
|
2284
|
+
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.firstValueFrom)(this.activeUserId$);
|
|
2285
|
+
const folder = yield this.folderService.getFromState(id, activeUserId);
|
|
2285
2286
|
if (folder == null) {
|
|
2286
2287
|
return _models_response__WEBPACK_IMPORTED_MODULE_7__/* .Response */ .Y.notFound();
|
|
2287
2288
|
}
|
|
2288
2289
|
let folderView = yield folder.decrypt();
|
|
2289
2290
|
folderView = _bitwarden_common_models_export_folder_export__WEBPACK_IMPORTED_MODULE_4__/* .FolderExport */ .V.toView(req, folderView);
|
|
2290
|
-
const
|
|
2291
|
-
const userKey = yield this.keyService.getUserKeyWithLegacySupport(activeUserId.id);
|
|
2291
|
+
const userKey = yield this.keyService.getUserKeyWithLegacySupport(activeUserId);
|
|
2292
2292
|
const encFolder = yield this.folderService.encrypt(folderView, userKey);
|
|
2293
2293
|
try {
|
|
2294
|
-
yield this.folderApiService.save(encFolder);
|
|
2295
|
-
const updatedFolder = yield this.folderService.get(folder.id);
|
|
2294
|
+
yield this.folderApiService.save(encFolder, activeUserId);
|
|
2295
|
+
const updatedFolder = yield this.folderService.get(folder.id, activeUserId);
|
|
2296
2296
|
const decFolder = yield updatedFolder.decrypt();
|
|
2297
2297
|
const res = new _vault_models_folder_response__WEBPACK_IMPORTED_MODULE_10__/* .FolderResponse */ .s(decFolder);
|
|
2298
2298
|
return _models_response__WEBPACK_IMPORTED_MODULE_7__/* .Response */ .Y.success(res);
|
|
@@ -2505,6 +2505,7 @@ class GetCommand extends download_command/* DownloadCommand */._ {
|
|
|
2505
2505
|
this.eventCollectionService = eventCollectionService;
|
|
2506
2506
|
this.accountProfileService = accountProfileService;
|
|
2507
2507
|
this.accountService = accountService;
|
|
2508
|
+
this.activeUserId$ = this.accountService.activeAccount$.pipe((0,external_rxjs_.map)((a) => a === null || a === void 0 ? void 0 : a.id));
|
|
2508
2509
|
}
|
|
2509
2510
|
run(object, id, cmdOptions) {
|
|
2510
2511
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -2551,8 +2552,8 @@ class GetCommand extends download_command/* DownloadCommand */._ {
|
|
|
2551
2552
|
let decCipher = null;
|
|
2552
2553
|
if (utils/* Utils */.A.isGuid(id)) {
|
|
2553
2554
|
const cipher = yield this.cipherService.get(id);
|
|
2554
|
-
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.accountService.activeAccount$.pipe((0,external_rxjs_.map)((a) => a === null || a === void 0 ? void 0 : a.id)));
|
|
2555
2555
|
if (cipher != null) {
|
|
2556
|
+
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.activeUserId$);
|
|
2556
2557
|
decCipher = yield cipher.decrypt(yield this.cipherService.getKeyForCipherKeyDecryption(cipher, activeUserId));
|
|
2557
2558
|
}
|
|
2558
2559
|
}
|
|
@@ -2586,9 +2587,7 @@ class GetCommand extends download_command/* DownloadCommand */._ {
|
|
|
2586
2587
|
return models_response/* Response */.Y.multipleResults(decCipher.map((c) => c.id));
|
|
2587
2588
|
}
|
|
2588
2589
|
}
|
|
2589
|
-
|
|
2590
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
2591
|
-
this.eventCollectionService.collect(enums/* EventType */.Bx.Cipher_ClientViewed, id, true, decCipher.organizationId);
|
|
2590
|
+
yield this.eventCollectionService.collect(enums/* EventType */.Bx.Cipher_ClientViewed, decCipher.id, true, decCipher.organizationId);
|
|
2592
2591
|
const res = new cipher_response/* CipherResponse */.N(decCipher);
|
|
2593
2592
|
return models_response/* Response */.Y.success(res);
|
|
2594
2593
|
});
|
|
@@ -2666,7 +2665,8 @@ class GetCommand extends download_command/* DownloadCommand */._ {
|
|
|
2666
2665
|
if (totp == null) {
|
|
2667
2666
|
return models_response/* Response */.Y.error("Couldn't generate TOTP code.");
|
|
2668
2667
|
}
|
|
2669
|
-
const
|
|
2668
|
+
const account = yield (0,external_rxjs_.firstValueFrom)(this.accountService.activeAccount$);
|
|
2669
|
+
const canAccessPremium = yield (0,external_rxjs_.firstValueFrom)(this.accountProfileService.hasPremiumFromAnySource$(account.id));
|
|
2670
2670
|
if (!canAccessPremium) {
|
|
2671
2671
|
const originalCipher = yield this.cipherService.get(cipher.id);
|
|
2672
2672
|
if (originalCipher == null ||
|
|
@@ -2733,7 +2733,8 @@ class GetCommand extends download_command/* DownloadCommand */._ {
|
|
|
2733
2733
|
if (attachments.length > 1) {
|
|
2734
2734
|
return models_response/* Response */.Y.multipleResults(attachments.map((a) => a.id));
|
|
2735
2735
|
}
|
|
2736
|
-
const
|
|
2736
|
+
const account = yield (0,external_rxjs_.firstValueFrom)(this.accountService.activeAccount$);
|
|
2737
|
+
const canAccessPremium = yield (0,external_rxjs_.firstValueFrom)(this.accountProfileService.hasPremiumFromAnySource$(account.id));
|
|
2737
2738
|
if (!canAccessPremium) {
|
|
2738
2739
|
const originalCipher = yield this.cipherService.get(cipher.id);
|
|
2739
2740
|
if (originalCipher == null || originalCipher.organizationId == null) {
|
|
@@ -2765,14 +2766,15 @@ class GetCommand extends download_command/* DownloadCommand */._ {
|
|
|
2765
2766
|
getFolder(id) {
|
|
2766
2767
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2767
2768
|
let decFolder = null;
|
|
2769
|
+
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.activeUserId$);
|
|
2768
2770
|
if (utils/* Utils */.A.isGuid(id)) {
|
|
2769
|
-
const folder = yield this.folderService.getFromState(id);
|
|
2771
|
+
const folder = yield this.folderService.getFromState(id, activeUserId);
|
|
2770
2772
|
if (folder != null) {
|
|
2771
2773
|
decFolder = yield folder.decrypt();
|
|
2772
2774
|
}
|
|
2773
2775
|
}
|
|
2774
2776
|
else if (id.trim() !== "") {
|
|
2775
|
-
let folders = yield this.folderService.getAllDecryptedFromState();
|
|
2777
|
+
let folders = yield this.folderService.getAllDecryptedFromState(activeUserId);
|
|
2776
2778
|
folders = src_utils/* CliUtils */.U.searchFolders(folders, id);
|
|
2777
2779
|
if (folders.length > 1) {
|
|
2778
2780
|
return models_response/* Response */.Y.multipleResults(folders.map((f) => f.id));
|
|
@@ -2925,7 +2927,7 @@ class GetCommand extends download_command/* DownloadCommand */._ {
|
|
|
2925
2927
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2926
2928
|
let fingerprint = null;
|
|
2927
2929
|
if (id === "me") {
|
|
2928
|
-
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.
|
|
2930
|
+
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.activeUserId$);
|
|
2929
2931
|
const publicKey = yield (0,external_rxjs_.firstValueFrom)(this.keyService.userPublicKey$(activeUserId));
|
|
2930
2932
|
fingerprint = yield this.keyService.getFingerprint(activeUserId, publicKey);
|
|
2931
2933
|
}
|
|
@@ -3019,7 +3021,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
3019
3021
|
|
|
3020
3022
|
|
|
3021
3023
|
class ListCommand {
|
|
3022
|
-
constructor(cipherService, folderService, collectionService, organizationService, searchService, organizationUserApiService, apiService, eventCollectionService) {
|
|
3024
|
+
constructor(cipherService, folderService, collectionService, organizationService, searchService, organizationUserApiService, apiService, eventCollectionService, accountService) {
|
|
3023
3025
|
this.cipherService = cipherService;
|
|
3024
3026
|
this.folderService = folderService;
|
|
3025
3027
|
this.collectionService = collectionService;
|
|
@@ -3028,6 +3030,7 @@ class ListCommand {
|
|
|
3028
3030
|
this.organizationUserApiService = organizationUserApiService;
|
|
3029
3031
|
this.apiService = apiService;
|
|
3030
3032
|
this.eventCollectionService = eventCollectionService;
|
|
3033
|
+
this.accountService = accountService;
|
|
3031
3034
|
}
|
|
3032
3035
|
run(object, cmdOptions) {
|
|
3033
3036
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -3117,7 +3120,8 @@ class ListCommand {
|
|
|
3117
3120
|
}
|
|
3118
3121
|
listFolders(options) {
|
|
3119
3122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3120
|
-
|
|
3123
|
+
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.accountService.activeAccount$.pipe((0,external_rxjs_.map)((a) => a === null || a === void 0 ? void 0 : a.id)));
|
|
3124
|
+
let folders = yield this.folderService.getAllDecryptedFromState(activeUserId);
|
|
3121
3125
|
if (options.search != null && options.search.trim() !== "") {
|
|
3122
3126
|
folders = src_utils/* CliUtils */.U.searchFolders(folders, options.search);
|
|
3123
3127
|
}
|
|
@@ -3367,6 +3371,57 @@ class StatusCommand {
|
|
|
3367
3371
|
}
|
|
3368
3372
|
|
|
3369
3373
|
|
|
3374
|
+
/***/ }),
|
|
3375
|
+
|
|
3376
|
+
/***/ 9653:
|
|
3377
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3378
|
+
|
|
3379
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3380
|
+
/* harmony export */ F: () => (/* binding */ CliBiometricsService)
|
|
3381
|
+
/* harmony export */ });
|
|
3382
|
+
/* harmony import */ var _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
|
|
3383
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3384
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3385
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3386
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
3387
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
3388
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
3389
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3390
|
+
});
|
|
3391
|
+
};
|
|
3392
|
+
|
|
3393
|
+
class CliBiometricsService extends _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_0__/* .BiometricsService */ .Zm {
|
|
3394
|
+
authenticateWithBiometrics() {
|
|
3395
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3396
|
+
return false;
|
|
3397
|
+
});
|
|
3398
|
+
}
|
|
3399
|
+
getBiometricsStatus() {
|
|
3400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3401
|
+
return _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_0__/* .BiometricsStatus */ .cR.PlatformUnsupported;
|
|
3402
|
+
});
|
|
3403
|
+
}
|
|
3404
|
+
unlockWithBiometricsForUser(userId) {
|
|
3405
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3406
|
+
return null;
|
|
3407
|
+
});
|
|
3408
|
+
}
|
|
3409
|
+
getBiometricsStatusForUser(userId) {
|
|
3410
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3411
|
+
return _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_0__/* .BiometricsStatus */ .cR.PlatformUnsupported;
|
|
3412
|
+
});
|
|
3413
|
+
}
|
|
3414
|
+
getShouldAutopromptNow() {
|
|
3415
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3416
|
+
return false;
|
|
3417
|
+
});
|
|
3418
|
+
}
|
|
3419
|
+
setShouldAutopromptNow(value) {
|
|
3420
|
+
return __awaiter(this, void 0, void 0, function* () { });
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
|
|
3370
3425
|
/***/ }),
|
|
3371
3426
|
|
|
3372
3427
|
/***/ 7035:
|
|
@@ -8020,7 +8075,7 @@ class SendProgram extends base_program/* BaseProgram */.C {
|
|
|
8020
8075
|
.action((encodedJson, options) => send_program_awaiter(this, void 0, void 0, function* () {
|
|
8021
8076
|
yield this.exitIfLocked();
|
|
8022
8077
|
const getCmd = new commands/* SendGetCommand */.MA(this.serviceContainer.sendService, this.serviceContainer.environmentService, this.serviceContainer.searchService, this.serviceContainer.encryptService, this.serviceContainer.apiService);
|
|
8023
|
-
const cmd = new commands/* SendEditCommand */._s(this.serviceContainer.sendService, getCmd, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService);
|
|
8078
|
+
const cmd = new commands/* SendEditCommand */._s(this.serviceContainer.sendService, getCmd, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.accountService);
|
|
8024
8079
|
const response = yield cmd.run(encodedJson, options);
|
|
8025
8080
|
this.processResponse(response);
|
|
8026
8081
|
}));
|
|
@@ -8077,7 +8132,7 @@ class SendProgram extends base_program/* BaseProgram */.C {
|
|
|
8077
8132
|
runCreate(encodedJson, options) {
|
|
8078
8133
|
return send_program_awaiter(this, void 0, void 0, function* () {
|
|
8079
8134
|
yield this.exitIfLocked();
|
|
8080
|
-
const cmd = new commands/* SendCreateCommand */.QR(this.serviceContainer.sendService, this.serviceContainer.environmentService, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService);
|
|
8135
|
+
const cmd = new commands/* SendCreateCommand */.QR(this.serviceContainer.sendService, this.serviceContainer.environmentService, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.accountService);
|
|
8081
8136
|
return yield cmd.run(encodedJson, options);
|
|
8082
8137
|
});
|
|
8083
8138
|
}
|
|
@@ -8426,7 +8481,7 @@ class VaultProgram extends base_program/* BaseProgram */.C {
|
|
|
8426
8481
|
return;
|
|
8427
8482
|
}
|
|
8428
8483
|
yield this.exitIfLocked();
|
|
8429
|
-
const command = new list_command/* ListCommand */.S(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.collectionService, this.serviceContainer.organizationService, this.serviceContainer.searchService, this.serviceContainer.organizationUserApiService, this.serviceContainer.apiService, this.serviceContainer.eventCollectionService);
|
|
8484
|
+
const command = new list_command/* ListCommand */.S(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.collectionService, this.serviceContainer.organizationService, this.serviceContainer.searchService, this.serviceContainer.organizationUserApiService, this.serviceContainer.apiService, this.serviceContainer.eventCollectionService, this.serviceContainer.accountService);
|
|
8430
8485
|
const response = yield command.run(object, cmd);
|
|
8431
8486
|
this.processResponse(response);
|
|
8432
8487
|
}));
|
|
@@ -8563,7 +8618,7 @@ class VaultProgram extends base_program/* BaseProgram */.C {
|
|
|
8563
8618
|
return;
|
|
8564
8619
|
}
|
|
8565
8620
|
yield this.exitIfLocked();
|
|
8566
|
-
const command = new delete_command/* DeleteCommand */.R(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.apiService, this.serviceContainer.folderApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.cipherAuthorizationService);
|
|
8621
|
+
const command = new delete_command/* DeleteCommand */.R(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.apiService, this.serviceContainer.folderApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.cipherAuthorizationService, this.serviceContainer.accountService);
|
|
8567
8622
|
const response = yield command.run(object, id, cmd);
|
|
8568
8623
|
this.processResponse(response);
|
|
8569
8624
|
}));
|
|
@@ -8904,16 +8959,16 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
8904
8959
|
/* harmony import */ var _bitwarden_common_autofill_services_domain_settings_service__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(3400);
|
|
8905
8960
|
/* harmony import */ var _bitwarden_common_billing_services_account_billing_account_profile_state_service__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(9344);
|
|
8906
8961
|
/* harmony import */ var _bitwarden_common_enums__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(832);
|
|
8907
|
-
/* harmony import */ var _bitwarden_common_platform_enums__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(
|
|
8908
|
-
/* harmony import */ var
|
|
8962
|
+
/* harmony import */ var _bitwarden_common_platform_enums__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(5874);
|
|
8963
|
+
/* harmony import */ var _bitwarden_common_platform_factories_state_factory__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(1737);
|
|
8909
8964
|
/* harmony import */ var _bitwarden_common_platform_messaging__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(3083);
|
|
8910
8965
|
/* harmony import */ var _bitwarden_common_platform_models_domain_account__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(1656);
|
|
8911
|
-
/* harmony import */ var
|
|
8966
|
+
/* harmony import */ var _bitwarden_common_platform_models_domain_global_state__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(9464);
|
|
8912
8967
|
/* harmony import */ var _bitwarden_common_platform_scheduling__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(7143);
|
|
8913
8968
|
/* harmony import */ var _bitwarden_common_platform_services_app_id_service__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(5444);
|
|
8914
8969
|
/* harmony import */ var _bitwarden_common_platform_services_config_config_api_service__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(178);
|
|
8915
8970
|
/* harmony import */ var _bitwarden_common_platform_services_config_default_config_service__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(6497);
|
|
8916
|
-
/* harmony import */ var
|
|
8971
|
+
/* harmony import */ var _bitwarden_common_platform_services_container_service__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(7634);
|
|
8917
8972
|
/* harmony import */ var _bitwarden_common_platform_services_cryptography_encrypt_service_implementation__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(2334);
|
|
8918
8973
|
/* harmony import */ var _bitwarden_common_platform_services_cryptography_fallback_bulk_encrypt_service__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(8943);
|
|
8919
8974
|
/* harmony import */ var _bitwarden_common_platform_services_default_environment_service__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(772);
|
|
@@ -8924,9 +8979,9 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
8924
8979
|
/* harmony import */ var _bitwarden_common_platform_services_migration_runner__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(2539);
|
|
8925
8980
|
/* harmony import */ var _bitwarden_common_platform_services_sdk_default_sdk_client_factory__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(4536);
|
|
8926
8981
|
/* harmony import */ var _bitwarden_common_platform_services_sdk_default_sdk_service__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(3315);
|
|
8927
|
-
/* harmony import */ var
|
|
8982
|
+
/* harmony import */ var _bitwarden_common_platform_services_sdk_noop_sdk_client_factory__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(2203);
|
|
8928
8983
|
/* harmony import */ var _bitwarden_common_platform_services_state_service__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(4640);
|
|
8929
|
-
/* harmony import */ var
|
|
8984
|
+
/* harmony import */ var _bitwarden_common_platform_services_storage_service_provider__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(8216);
|
|
8930
8985
|
/* harmony import */ var _bitwarden_common_platform_services_user_auto_unlock_key_service__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(9429);
|
|
8931
8986
|
/* harmony import */ var _bitwarden_common_platform_state__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(1068);
|
|
8932
8987
|
/* harmony import */ var _bitwarden_common_platform_state_implementations_default_active_user_state_provider__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(5517);
|
|
@@ -8956,16 +9011,17 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
8956
9011
|
/* harmony import */ var _bitwarden_common_vault_services_totp_service__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(4809);
|
|
8957
9012
|
/* harmony import */ var _bitwarden_generator_legacy__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(2912);
|
|
8958
9013
|
/* harmony import */ var _bitwarden_importer_core__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(9711);
|
|
8959
|
-
/* harmony import */ var _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(
|
|
8960
|
-
/* harmony import */ var _bitwarden_node_services_node_crypto_function_service__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(
|
|
9014
|
+
/* harmony import */ var _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(5907);
|
|
9015
|
+
/* harmony import */ var _bitwarden_node_services_node_crypto_function_service__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(8248);
|
|
8961
9016
|
/* harmony import */ var _bitwarden_vault_export_core__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(1166);
|
|
8962
|
-
/* harmony import */ var
|
|
8963
|
-
/* harmony import */ var
|
|
8964
|
-
/* harmony import */ var
|
|
8965
|
-
/* harmony import */ var
|
|
8966
|
-
/* harmony import */ var
|
|
8967
|
-
/* harmony import */ var
|
|
8968
|
-
/* harmony import */ var
|
|
9017
|
+
/* harmony import */ var _key_management_cli_biometrics_service__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(9653);
|
|
9018
|
+
/* harmony import */ var _platform_flags__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(9308);
|
|
9019
|
+
/* harmony import */ var _platform_services_cli_platform_utils_service__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(6698);
|
|
9020
|
+
/* harmony import */ var _platform_services_console_log_service__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(5735);
|
|
9021
|
+
/* harmony import */ var _platform_services_i18n_service__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(5350);
|
|
9022
|
+
/* harmony import */ var _platform_services_lowdb_storage_service__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(1173);
|
|
9023
|
+
/* harmony import */ var _platform_services_node_api_service__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(1363);
|
|
9024
|
+
/* harmony import */ var _platform_services_node_env_secure_storage_service__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(9177);
|
|
8969
9025
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_bitwarden_common_platform_services_sdk_default_sdk_client_factory__WEBPACK_IMPORTED_MODULE_42__]);
|
|
8970
9026
|
_bitwarden_common_platform_services_sdk_default_sdk_client_factory__WEBPACK_IMPORTED_MODULE_42__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
8971
9027
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
@@ -9068,6 +9124,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
9068
9124
|
|
|
9069
9125
|
|
|
9070
9126
|
|
|
9127
|
+
|
|
9071
9128
|
|
|
9072
9129
|
|
|
9073
9130
|
// Polyfills
|
|
@@ -9103,12 +9160,12 @@ class ServiceContainer {
|
|
|
9103
9160
|
p = path__WEBPACK_IMPORTED_MODULE_1__.join((_c = process.env.HOME) !== null && _c !== void 0 ? _c : "", ".config/Bitwarden CLI");
|
|
9104
9161
|
}
|
|
9105
9162
|
const logoutCallback = () => __awaiter(this, void 0, void 0, function* () { return yield this.logout(); });
|
|
9106
|
-
this.platformUtilsService = new
|
|
9107
|
-
this.logService = new
|
|
9163
|
+
this.platformUtilsService = new _platform_services_cli_platform_utils_service__WEBPACK_IMPORTED_MODULE_78__/* .CliPlatformUtilsService */ .w(_bitwarden_common_enums__WEBPACK_IMPORTED_MODULE_26__/* .ClientType */ .sK.Cli, packageJson);
|
|
9164
|
+
this.logService = new _platform_services_console_log_service__WEBPACK_IMPORTED_MODULE_79__/* .ConsoleLogService */ .V(this.platformUtilsService.isDev(), (level) => process.env.BITWARDENCLI_DEBUG !== "true" && level <= _bitwarden_common_platform_enums__WEBPACK_IMPORTED_MODULE_27__/* .LogLevelType */ .xk.Info);
|
|
9108
9165
|
this.cryptoFunctionService = new _bitwarden_node_services_node_crypto_function_service__WEBPACK_IMPORTED_MODULE_75__/* .NodeCryptoFunctionService */ .h();
|
|
9109
9166
|
this.encryptService = new _bitwarden_common_platform_services_cryptography_encrypt_service_implementation__WEBPACK_IMPORTED_MODULE_34__/* .EncryptServiceImplementation */ .H(this.cryptoFunctionService, this.logService, true);
|
|
9110
|
-
this.storageService = new
|
|
9111
|
-
this.secureStorageService = new
|
|
9167
|
+
this.storageService = new _platform_services_lowdb_storage_service__WEBPACK_IMPORTED_MODULE_81__/* .LowdbStorageService */ .N(this.logService, null, p, false, true);
|
|
9168
|
+
this.secureStorageService = new _platform_services_node_env_secure_storage_service__WEBPACK_IMPORTED_MODULE_83__/* .NodeEnvSecureStorageService */ .H(this.storageService, this.logService,
|
|
9112
9169
|
// MAC failures for secure storage are being logged for customers today and
|
|
9113
9170
|
// they occur when users unlock / login and refresh a session key but don't
|
|
9114
9171
|
// export it into their environment (e.g. BW_SESSION_KEY). This leaves a stale
|
|
@@ -9118,11 +9175,11 @@ class ServiceContainer {
|
|
|
9118
9175
|
new _bitwarden_common_platform_services_cryptography_encrypt_service_implementation__WEBPACK_IMPORTED_MODULE_34__/* .EncryptServiceImplementation */ .H(this.cryptoFunctionService, this.logService, false));
|
|
9119
9176
|
this.memoryStorageService = new _bitwarden_common_platform_services_memory_storage_service__WEBPACK_IMPORTED_MODULE_39__/* .MemoryStorageService */ .g();
|
|
9120
9177
|
this.memoryStorageForStateProviders = new _bitwarden_common_platform_state_storage_memory_storage_service__WEBPACK_IMPORTED_MODULE_53__/* .MemoryStorageService */ .g();
|
|
9121
|
-
const storageServiceProvider = new
|
|
9178
|
+
const storageServiceProvider = new _bitwarden_common_platform_services_storage_service_provider__WEBPACK_IMPORTED_MODULE_84__/* .StorageServiceProvider */ .w(this.storageService, this.memoryStorageForStateProviders);
|
|
9122
9179
|
this.globalStateProvider = new _bitwarden_common_platform_state_implementations_default_global_state_provider__WEBPACK_IMPORTED_MODULE_49__/* .DefaultGlobalStateProvider */ .d(storageServiceProvider, this.logService);
|
|
9123
9180
|
const stateEventRegistrarService = new _bitwarden_common_platform_state_state_event_registrar_service__WEBPACK_IMPORTED_MODULE_52__/* .StateEventRegistrarService */ .iO(this.globalStateProvider, storageServiceProvider);
|
|
9124
9181
|
this.stateEventRunnerService = new _bitwarden_common_platform_state__WEBPACK_IMPORTED_MODULE_46__/* .StateEventRunnerService */ .lR(this.globalStateProvider, storageServiceProvider);
|
|
9125
|
-
this.i18nService = new
|
|
9182
|
+
this.i18nService = new _platform_services_i18n_service__WEBPACK_IMPORTED_MODULE_80__/* .I18nService */ .W("en", "./locales", this.globalStateProvider);
|
|
9126
9183
|
this.singleUserStateProvider = new _bitwarden_common_platform_state_implementations_default_single_user_state_provider__WEBPACK_IMPORTED_MODULE_50__/* .DefaultSingleUserStateProvider */ .B(storageServiceProvider, stateEventRegistrarService, this.logService);
|
|
9127
9184
|
this.messagingService = _bitwarden_common_platform_messaging__WEBPACK_IMPORTED_MODULE_28__/* .MessageSender */ .D$.EMPTY;
|
|
9128
9185
|
this.accountService = new _bitwarden_common_auth_services_account_service__WEBPACK_IMPORTED_MODULE_12__/* .AccountServiceImplementation */ .xy(this.messagingService, this.logService, this.globalStateProvider);
|
|
@@ -9133,7 +9190,7 @@ class ServiceContainer {
|
|
|
9133
9190
|
this.keyGenerationService = new _bitwarden_common_platform_services_key_generation_service__WEBPACK_IMPORTED_MODULE_38__/* .KeyGenerationService */ .$(this.cryptoFunctionService);
|
|
9134
9191
|
this.tokenService = new _bitwarden_common_auth_services_token_service__WEBPACK_IMPORTED_MODULE_19__/* .TokenService */ .B(this.singleUserStateProvider, this.globalStateProvider, this.platformUtilsService.supportsSecureStorage(), this.secureStorageService, this.keyGenerationService, this.encryptService, this.logService, logoutCallback);
|
|
9135
9192
|
const migrationRunner = new _bitwarden_common_platform_services_migration_runner__WEBPACK_IMPORTED_MODULE_41__/* .MigrationRunner */ .N(this.storageService, this.logService, new _bitwarden_common_platform_services_migration_builder_service__WEBPACK_IMPORTED_MODULE_40__/* .MigrationBuilderService */ .l(), _bitwarden_common_enums__WEBPACK_IMPORTED_MODULE_26__/* .ClientType */ .sK.Cli);
|
|
9136
|
-
this.stateService = new _bitwarden_common_platform_services_state_service__WEBPACK_IMPORTED_MODULE_44__/* .StateService */ .d(this.storageService, this.secureStorageService, this.memoryStorageService, this.logService, new
|
|
9193
|
+
this.stateService = new _bitwarden_common_platform_services_state_service__WEBPACK_IMPORTED_MODULE_44__/* .StateService */ .d(this.storageService, this.secureStorageService, this.memoryStorageService, this.logService, new _bitwarden_common_platform_factories_state_factory__WEBPACK_IMPORTED_MODULE_85__/* .StateFactory */ .Y(_bitwarden_common_platform_models_domain_global_state__WEBPACK_IMPORTED_MODULE_86__/* .GlobalState */ .R, _bitwarden_common_platform_models_domain_account__WEBPACK_IMPORTED_MODULE_29__/* .Account */ .gD), this.accountService, this.environmentService, this.tokenService, migrationRunner);
|
|
9137
9194
|
this.masterPasswordService = new _bitwarden_common_auth_services_master_password_master_password_service__WEBPACK_IMPORTED_MODULE_18__/* .MasterPasswordService */ .x(this.stateProvider, this.stateService, this.keyGenerationService, this.encryptService, this.logService);
|
|
9138
9195
|
this.kdfConfigService = new _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_74__/* .DefaultKdfConfigService */ .aT(this.stateProvider);
|
|
9139
9196
|
this.pinService = new _bitwarden_auth_common__WEBPACK_IMPORTED_MODULE_5__/* .PinService */ .d7(this.accountService, this.cryptoFunctionService, this.encryptService, this.kdfConfigService, this.keyGenerationService, this.logService, this.masterPasswordService, this.stateProvider, this.stateService);
|
|
@@ -9152,9 +9209,12 @@ class ServiceContainer {
|
|
|
9152
9209
|
const refreshAccessTokenErrorCallback = () => {
|
|
9153
9210
|
throw new Error("Refresh Access token error");
|
|
9154
9211
|
};
|
|
9155
|
-
this.apiService = new
|
|
9156
|
-
this.containerService = new
|
|
9157
|
-
this.
|
|
9212
|
+
this.apiService = new _platform_services_node_api_service__WEBPACK_IMPORTED_MODULE_82__/* .NodeApiService */ .c(this.tokenService, this.platformUtilsService, this.environmentService, this.appIdService, refreshAccessTokenErrorCallback, this.logService, logoutCallback, this.vaultTimeoutSettingsService, customUserAgent);
|
|
9213
|
+
this.containerService = new _bitwarden_common_platform_services_container_service__WEBPACK_IMPORTED_MODULE_87__/* .ContainerService */ .J(this.keyService, this.encryptService);
|
|
9214
|
+
this.configApiService = new _bitwarden_common_platform_services_config_config_api_service__WEBPACK_IMPORTED_MODULE_32__/* .ConfigApiService */ .s(this.apiService, this.tokenService);
|
|
9215
|
+
this.authService = new _bitwarden_common_auth_services_auth_service__WEBPACK_IMPORTED_MODULE_13__/* .AuthService */ .u(this.accountService, this.messagingService, this.keyService, this.apiService, this.stateService, this.tokenService);
|
|
9216
|
+
this.configService = new _bitwarden_common_platform_services_config_default_config_service__WEBPACK_IMPORTED_MODULE_33__/* .DefaultConfigService */ .vQ(this.configApiService, this.environmentService, this.logService, this.stateProvider, this.authService);
|
|
9217
|
+
this.domainSettingsService = new _bitwarden_common_autofill_services_domain_settings_service__WEBPACK_IMPORTED_MODULE_24__/* .DefaultDomainSettingsService */ .G(this.stateProvider, this.configService);
|
|
9158
9218
|
this.fileUploadService = new _bitwarden_common_platform_services_file_upload_file_upload_service__WEBPACK_IMPORTED_MODULE_37__/* .FileUploadService */ .P(this.logService, this.apiService);
|
|
9159
9219
|
this.sendStateProvider = new _bitwarden_common_tools_send_services_send_state_provider__WEBPACK_IMPORTED_MODULE_63__/* .SendStateProvider */ .T(this.stateProvider);
|
|
9160
9220
|
this.sendService = new _bitwarden_common_tools_send_services_send_service__WEBPACK_IMPORTED_MODULE_64__/* .SendService */ .u(this.keyService, this.i18nService, this.keyGenerationService, this.sendStateProvider, this.encryptService);
|
|
@@ -9166,18 +9226,15 @@ class ServiceContainer {
|
|
|
9166
9226
|
this.policyApiService = new _bitwarden_common_admin_console_services_policy_policy_api_service__WEBPACK_IMPORTED_MODULE_8__/* .PolicyApiService */ .S(this.policyService, this.apiService);
|
|
9167
9227
|
this.keyConnectorService = new _bitwarden_common_auth_services_key_connector_service__WEBPACK_IMPORTED_MODULE_17__/* .KeyConnectorService */ .Kl(this.accountService, this.masterPasswordService, this.keyService, this.apiService, this.tokenService, this.logService, this.organizationService, this.keyGenerationService, logoutCallback, this.stateProvider);
|
|
9168
9228
|
this.twoFactorService = new _bitwarden_common_auth_services_two_factor_service__WEBPACK_IMPORTED_MODULE_20__/* .TwoFactorService */ .fz(this.i18nService, this.platformUtilsService, this.globalStateProvider);
|
|
9169
|
-
const sdkClientFactory = (0,
|
|
9229
|
+
const sdkClientFactory = (0,_platform_flags__WEBPACK_IMPORTED_MODULE_88__/* .flagEnabled */ .U5)("sdk")
|
|
9170
9230
|
? new _bitwarden_common_platform_services_sdk_default_sdk_client_factory__WEBPACK_IMPORTED_MODULE_42__/* .DefaultSdkClientFactory */ .N()
|
|
9171
|
-
: new
|
|
9231
|
+
: new _bitwarden_common_platform_services_sdk_noop_sdk_client_factory__WEBPACK_IMPORTED_MODULE_89__/* .NoopSdkClientFactory */ .e();
|
|
9172
9232
|
this.sdkService = new _bitwarden_common_platform_services_sdk_default_sdk_service__WEBPACK_IMPORTED_MODULE_43__/* .DefaultSdkService */ .$(sdkClientFactory, this.environmentService, this.platformUtilsService, this.accountService, this.kdfConfigService, this.keyService, customUserAgent);
|
|
9173
9233
|
this.passwordStrengthService = new _bitwarden_common_tools_password_strength__WEBPACK_IMPORTED_MODULE_61__/* .PasswordStrengthService */ .y();
|
|
9174
9234
|
this.passwordGenerationService = (0,_bitwarden_generator_legacy__WEBPACK_IMPORTED_MODULE_72__/* .legacyPasswordGenerationServiceFactory */ .Im)(this.encryptService, this.keyService, this.policyService, this.accountService, this.stateProvider);
|
|
9175
9235
|
this.authRequestService = new _bitwarden_auth_common__WEBPACK_IMPORTED_MODULE_5__/* .AuthRequestService */ .H8(this.appIdService, this.accountService, this.masterPasswordService, this.keyService, this.encryptService, this.apiService, this.stateProvider);
|
|
9176
|
-
this.billingAccountProfileStateService = new _bitwarden_common_billing_services_account_billing_account_profile_state_service__WEBPACK_IMPORTED_MODULE_25__/* .DefaultBillingAccountProfileStateService */ .x(this.stateProvider);
|
|
9236
|
+
this.billingAccountProfileStateService = new _bitwarden_common_billing_services_account_billing_account_profile_state_service__WEBPACK_IMPORTED_MODULE_25__/* .DefaultBillingAccountProfileStateService */ .x(this.stateProvider, this.platformUtilsService, this.apiService);
|
|
9177
9237
|
this.taskSchedulerService = new _bitwarden_common_platform_scheduling__WEBPACK_IMPORTED_MODULE_30__/* .DefaultTaskSchedulerService */ .P8(this.logService);
|
|
9178
|
-
this.authService = new _bitwarden_common_auth_services_auth_service__WEBPACK_IMPORTED_MODULE_13__/* .AuthService */ .u(this.accountService, this.messagingService, this.keyService, this.apiService, this.stateService, this.tokenService);
|
|
9179
|
-
this.configApiService = new _bitwarden_common_platform_services_config_config_api_service__WEBPACK_IMPORTED_MODULE_32__/* .ConfigApiService */ .s(this.apiService, this.tokenService);
|
|
9180
|
-
this.configService = new _bitwarden_common_platform_services_config_default_config_service__WEBPACK_IMPORTED_MODULE_33__/* .DefaultConfigService */ .vQ(this.configApiService, this.environmentService, this.logService, this.stateProvider, this.authService);
|
|
9181
9238
|
this.devicesApiService = new _bitwarden_common_auth_services_devices_api_service_implementation__WEBPACK_IMPORTED_MODULE_16__/* .DevicesApiServiceImplementation */ .D(this.apiService);
|
|
9182
9239
|
this.deviceTrustService = new _bitwarden_common_auth_services_device_trust_service_implementation__WEBPACK_IMPORTED_MODULE_15__/* .DeviceTrustService */ .Wn(this.keyGenerationService, this.cryptoFunctionService, this.keyService, this.encryptService, this.appIdService, this.devicesApiService, this.i18nService, this.platformUtilsService, this.stateProvider, this.secureStorageService, this.userDecryptionOptionsService, this.logService, this.configService);
|
|
9183
9240
|
this.loginStrategyService = new _bitwarden_auth_common__WEBPACK_IMPORTED_MODULE_5__/* .LoginStrategyService */ .CL(this.accountService, this.masterPasswordService, this.keyService, this.apiService, this.tokenService, this.appIdService, this.platformUtilsService, this.messagingService, this.logService, this.keyConnectorService, this.environmentService, this.stateService, this.twoFactorService, this.i18nService, this.encryptService, this.passwordStrengthService, this.policyService, this.deviceTrustService, this.authRequestService, this.userDecryptionOptionsService, this.globalStateProvider, this.billingAccountProfileStateService, this.vaultTimeoutSettingsService, this.kdfConfigService, this.taskSchedulerService);
|
|
@@ -9188,8 +9245,9 @@ class ServiceContainer {
|
|
|
9188
9245
|
this.folderApiService = new _bitwarden_common_vault_services_folder_folder_api_service__WEBPACK_IMPORTED_MODULE_69__/* .FolderApiService */ .U(this.folderService, this.apiService);
|
|
9189
9246
|
const lockedCallback = (userId) => __awaiter(this, void 0, void 0, function* () { return yield this.keyService.clearStoredUserKey(_bitwarden_common_platform_enums__WEBPACK_IMPORTED_MODULE_27__/* .KeySuffixOptions */ .hq.Auto); });
|
|
9190
9247
|
this.userVerificationApiService = new _bitwarden_common_auth_services_user_verification_user_verification_api_service__WEBPACK_IMPORTED_MODULE_21__/* .UserVerificationApiService */ .S(this.apiService);
|
|
9191
|
-
this.userVerificationService = new _bitwarden_common_auth_services_user_verification_user_verification_service__WEBPACK_IMPORTED_MODULE_22__/* .UserVerificationService */ .i(this.keyService, this.accountService, this.masterPasswordService, this.i18nService, this.userVerificationApiService, this.userDecryptionOptionsService, this.pinService, this.
|
|
9192
|
-
|
|
9248
|
+
this.userVerificationService = new _bitwarden_common_auth_services_user_verification_user_verification_service__WEBPACK_IMPORTED_MODULE_22__/* .UserVerificationService */ .i(this.keyService, this.accountService, this.masterPasswordService, this.i18nService, this.userVerificationApiService, this.userDecryptionOptionsService, this.pinService, this.kdfConfigService, new _key_management_cli_biometrics_service__WEBPACK_IMPORTED_MODULE_77__/* .CliBiometricsService */ .F());
|
|
9249
|
+
const biometricService = new _key_management_cli_biometrics_service__WEBPACK_IMPORTED_MODULE_77__/* .CliBiometricsService */ .F();
|
|
9250
|
+
this.vaultTimeoutService = new _bitwarden_common_services_vault_timeout_vault_timeout_service__WEBPACK_IMPORTED_MODULE_60__/* .VaultTimeoutService */ .n(this.accountService, this.masterPasswordService, this.cipherService, this.folderService, this.collectionService, this.platformUtilsService, this.messagingService, this.searchService, this.stateService, this.authService, this.vaultTimeoutSettingsService, this.stateEventRunnerService, this.taskSchedulerService, this.logService, biometricService, lockedCallback, undefined);
|
|
9193
9251
|
this.avatarService = new _bitwarden_common_auth_services_avatar_service__WEBPACK_IMPORTED_MODULE_14__/* .AvatarService */ .v(this.apiService, this.stateProvider);
|
|
9194
9252
|
this.syncService = new _bitwarden_common_platform_sync_internal__WEBPACK_IMPORTED_MODULE_54__/* .DefaultSyncService */ .A(this.masterPasswordService, this.accountService, this.apiService, this.domainSettingsService, this.folderService, this.cipherService, this.keyService, this.collectionService, this.messagingService, this.policyService, this.sendService, this.logService, this.keyConnectorService, this.stateService, this.providerService, this.folderApiService, this.organizationService, this.sendApiService, this.userDecryptionOptionsService, this.avatarService, logoutCallback, this.billingAccountProfileStateService, this.tokenService, this.authService, this.stateProvider);
|
|
9195
9253
|
this.totpService = new _bitwarden_common_vault_services_totp_service__WEBPACK_IMPORTED_MODULE_71__/* .TotpService */ .R(this.cryptoFunctionService, this.logService);
|
|
@@ -9407,11 +9465,12 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
9407
9465
|
|
|
9408
9466
|
|
|
9409
9467
|
class SendCreateCommand {
|
|
9410
|
-
constructor(sendService, environmentService, sendApiService, accountProfileService) {
|
|
9468
|
+
constructor(sendService, environmentService, sendApiService, accountProfileService, accountService) {
|
|
9411
9469
|
this.sendService = sendService;
|
|
9412
9470
|
this.environmentService = environmentService;
|
|
9413
9471
|
this.sendApiService = sendApiService;
|
|
9414
9472
|
this.accountProfileService = accountProfileService;
|
|
9473
|
+
this.accountService = accountService;
|
|
9415
9474
|
}
|
|
9416
9475
|
run(requestJson, cmdOptions) {
|
|
9417
9476
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -9461,12 +9520,13 @@ class SendCreateCommand {
|
|
|
9461
9520
|
const maxAccessCount = (_h = req.maxAccessCount) !== null && _h !== void 0 ? _h : options.maxAccessCount;
|
|
9462
9521
|
req.key = null;
|
|
9463
9522
|
req.maxAccessCount = maxAccessCount;
|
|
9523
|
+
const hasPremium$ = this.accountService.activeAccount$.pipe((0,external_rxjs_.switchMap)(({ id }) => this.accountProfileService.hasPremiumFromAnySource$(id)));
|
|
9464
9524
|
switch (req.type) {
|
|
9465
9525
|
case send_type/* SendType */.N.File:
|
|
9466
9526
|
if (process.env.BW_SERVE === "true") {
|
|
9467
9527
|
return models_response/* Response */.Y.error("Creating a file-based Send is unsupported through the `serve` command at this time.");
|
|
9468
9528
|
}
|
|
9469
|
-
if (!(yield (0,external_rxjs_.firstValueFrom)(
|
|
9529
|
+
if (!(yield (0,external_rxjs_.firstValueFrom)(hasPremium$))) {
|
|
9470
9530
|
return models_response/* Response */.Y.error("Premium status is required to use this feature.");
|
|
9471
9531
|
}
|
|
9472
9532
|
if (filePath == null) {
|
|
@@ -9570,11 +9630,12 @@ var edit_command_awaiter = (undefined && undefined.__awaiter) || function (thisA
|
|
|
9570
9630
|
|
|
9571
9631
|
|
|
9572
9632
|
class SendEditCommand {
|
|
9573
|
-
constructor(sendService, getCommand, sendApiService, accountProfileService) {
|
|
9633
|
+
constructor(sendService, getCommand, sendApiService, accountProfileService, accountService) {
|
|
9574
9634
|
this.sendService = sendService;
|
|
9575
9635
|
this.getCommand = getCommand;
|
|
9576
9636
|
this.sendApiService = sendApiService;
|
|
9577
9637
|
this.accountProfileService = accountProfileService;
|
|
9638
|
+
this.accountService = accountService;
|
|
9578
9639
|
}
|
|
9579
9640
|
run(requestJson, cmdOptions) {
|
|
9580
9641
|
return edit_command_awaiter(this, void 0, void 0, function* () {
|
|
@@ -9611,7 +9672,8 @@ class SendEditCommand {
|
|
|
9611
9672
|
if (send.type !== req.type) {
|
|
9612
9673
|
return models_response/* Response */.Y.badRequest("Cannot change a Send's type");
|
|
9613
9674
|
}
|
|
9614
|
-
const
|
|
9675
|
+
const account = yield (0,external_rxjs_.firstValueFrom)(this.accountService.activeAccount$);
|
|
9676
|
+
const canAccessPremium = yield (0,external_rxjs_.firstValueFrom)(this.accountProfileService.hasPremiumFromAnySource$(account.id));
|
|
9615
9677
|
if (send.type === send_type/* SendType */.N.File && !canAccessPremium) {
|
|
9616
9678
|
return models_response/* Response */.Y.error("Premium status is required to use this feature.");
|
|
9617
9679
|
}
|
|
@@ -10648,6 +10710,7 @@ class CreateCommand {
|
|
|
10648
10710
|
this.accountProfileService = accountProfileService;
|
|
10649
10711
|
this.organizationService = organizationService;
|
|
10650
10712
|
this.accountService = accountService;
|
|
10713
|
+
this.activeUserId$ = this.accountService.activeAccount$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_2__.map)((a) => a === null || a === void 0 ? void 0 : a.id));
|
|
10651
10714
|
}
|
|
10652
10715
|
run(object_1, requestJson_1, cmdOptions_1) {
|
|
10653
10716
|
return __awaiter(this, arguments, void 0, function* (object, requestJson, cmdOptions, additionalData = null) {
|
|
@@ -10689,7 +10752,7 @@ class CreateCommand {
|
|
|
10689
10752
|
}
|
|
10690
10753
|
createCipher(req) {
|
|
10691
10754
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10692
|
-
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_2__.firstValueFrom)(this.
|
|
10755
|
+
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_2__.firstValueFrom)(this.activeUserId$);
|
|
10693
10756
|
const cipher = yield this.cipherService.encrypt(_bitwarden_common_models_export_cipher_export__WEBPACK_IMPORTED_MODULE_4__/* .CipherExport */ .q.toView(req), activeUserId);
|
|
10694
10757
|
try {
|
|
10695
10758
|
const newCipher = yield this.cipherService.createWithServer(cipher);
|
|
@@ -10735,8 +10798,9 @@ class CreateCommand {
|
|
|
10735
10798
|
if (cipher == null) {
|
|
10736
10799
|
return _models_response__WEBPACK_IMPORTED_MODULE_9__/* .Response */ .Y.notFound();
|
|
10737
10800
|
}
|
|
10738
|
-
|
|
10739
|
-
|
|
10801
|
+
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_2__.firstValueFrom)(this.activeUserId$);
|
|
10802
|
+
const canAccessPremium = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_2__.firstValueFrom)(this.accountProfileService.hasPremiumFromAnySource$(activeUserId));
|
|
10803
|
+
if (cipher.organizationId == null && !canAccessPremium) {
|
|
10740
10804
|
return _models_response__WEBPACK_IMPORTED_MODULE_9__/* .Response */ .Y.error("Premium status is required to use this feature.");
|
|
10741
10805
|
}
|
|
10742
10806
|
const userKey = yield this.keyService.getUserKey();
|
|
@@ -10745,7 +10809,6 @@ class CreateCommand {
|
|
|
10745
10809
|
"See https://help.bitwarden.com/article/update-encryption-key/");
|
|
10746
10810
|
}
|
|
10747
10811
|
try {
|
|
10748
|
-
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_2__.firstValueFrom)(this.accountService.activeAccount$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_2__.map)((a) => a === null || a === void 0 ? void 0 : a.id)));
|
|
10749
10812
|
const updatedCipher = yield this.cipherService.saveAttachmentRawWithServer(cipher, fileName, new Uint8Array(fileBuf).buffer, activeUserId);
|
|
10750
10813
|
const decCipher = yield updatedCipher.decrypt(yield this.cipherService.getKeyForCipherKeyDecryption(updatedCipher, activeUserId));
|
|
10751
10814
|
return _models_response__WEBPACK_IMPORTED_MODULE_9__/* .Response */ .Y.success(new _models_cipher_response__WEBPACK_IMPORTED_MODULE_11__/* .CipherResponse */ .N(decCipher));
|
|
@@ -10757,12 +10820,12 @@ class CreateCommand {
|
|
|
10757
10820
|
}
|
|
10758
10821
|
createFolder(req) {
|
|
10759
10822
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10760
|
-
const
|
|
10761
|
-
const userKey = yield this.keyService.getUserKeyWithLegacySupport(
|
|
10823
|
+
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_2__.firstValueFrom)(this.activeUserId$);
|
|
10824
|
+
const userKey = yield this.keyService.getUserKeyWithLegacySupport(activeUserId);
|
|
10762
10825
|
const folder = yield this.folderService.encrypt(_bitwarden_common_models_export_folder_export__WEBPACK_IMPORTED_MODULE_6__/* .FolderExport */ .V.toView(req), userKey);
|
|
10763
10826
|
try {
|
|
10764
|
-
yield this.folderApiService.save(folder);
|
|
10765
|
-
const newFolder = yield this.folderService.get(folder.id);
|
|
10827
|
+
yield this.folderApiService.save(folder, activeUserId);
|
|
10828
|
+
const newFolder = yield this.folderService.get(folder.id, activeUserId);
|
|
10766
10829
|
const decFolder = yield newFolder.decrypt();
|
|
10767
10830
|
const res = new _models_folder_response__WEBPACK_IMPORTED_MODULE_12__/* .FolderResponse */ .s(decFolder);
|
|
10768
10831
|
return _models_response__WEBPACK_IMPORTED_MODULE_9__/* .Response */ .Y.success(res);
|
|
@@ -10849,13 +10912,14 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
10849
10912
|
|
|
10850
10913
|
|
|
10851
10914
|
class DeleteCommand {
|
|
10852
|
-
constructor(cipherService, folderService, apiService, folderApiService, accountProfileService, cipherAuthorizationService) {
|
|
10915
|
+
constructor(cipherService, folderService, apiService, folderApiService, accountProfileService, cipherAuthorizationService, accountService) {
|
|
10853
10916
|
this.cipherService = cipherService;
|
|
10854
10917
|
this.folderService = folderService;
|
|
10855
10918
|
this.apiService = apiService;
|
|
10856
10919
|
this.folderApiService = folderApiService;
|
|
10857
10920
|
this.accountProfileService = accountProfileService;
|
|
10858
10921
|
this.cipherAuthorizationService = cipherAuthorizationService;
|
|
10922
|
+
this.accountService = accountService;
|
|
10859
10923
|
}
|
|
10860
10924
|
run(object, id, cmdOptions) {
|
|
10861
10925
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -10918,7 +10982,8 @@ class DeleteCommand {
|
|
|
10918
10982
|
if (attachments.length === 0) {
|
|
10919
10983
|
return _models_response__WEBPACK_IMPORTED_MODULE_2__/* .Response */ .Y.error("Attachment `" + id + "` was not found.");
|
|
10920
10984
|
}
|
|
10921
|
-
const
|
|
10985
|
+
const account = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.firstValueFrom)(this.accountService.activeAccount$);
|
|
10986
|
+
const canAccessPremium = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.firstValueFrom)(this.accountProfileService.hasPremiumFromAnySource$(account.id));
|
|
10922
10987
|
if (cipher.organizationId == null && !canAccessPremium) {
|
|
10923
10988
|
return _models_response__WEBPACK_IMPORTED_MODULE_2__/* .Response */ .Y.error("Premium status is required to use this feature.");
|
|
10924
10989
|
}
|
|
@@ -10933,12 +10998,13 @@ class DeleteCommand {
|
|
|
10933
10998
|
}
|
|
10934
10999
|
deleteFolder(id) {
|
|
10935
11000
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10936
|
-
const
|
|
11001
|
+
const activeUserId = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.firstValueFrom)(this.accountService.activeAccount$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((a) => a === null || a === void 0 ? void 0 : a.id)));
|
|
11002
|
+
const folder = yield this.folderService.getFromState(id, activeUserId);
|
|
10937
11003
|
if (folder == null) {
|
|
10938
11004
|
return _models_response__WEBPACK_IMPORTED_MODULE_2__/* .Response */ .Y.notFound();
|
|
10939
11005
|
}
|
|
10940
11006
|
try {
|
|
10941
|
-
yield this.folderApiService.delete(id);
|
|
11007
|
+
yield this.folderApiService.delete(id, activeUserId);
|
|
10942
11008
|
return _models_response__WEBPACK_IMPORTED_MODULE_2__/* .Response */ .Y.success();
|
|
10943
11009
|
}
|
|
10944
11010
|
catch (e) {
|
|
@@ -11644,22 +11710,22 @@ class OssServeConfigurator {
|
|
|
11644
11710
|
constructor(serviceContainer) {
|
|
11645
11711
|
this.serviceContainer = serviceContainer;
|
|
11646
11712
|
this.getCommand = new get_command/* GetCommand */.s(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.collectionService, this.serviceContainer.totpService, this.serviceContainer.auditService, this.serviceContainer.keyService, this.serviceContainer.encryptService, this.serviceContainer.searchService, this.serviceContainer.apiService, this.serviceContainer.organizationService, this.serviceContainer.eventCollectionService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.accountService);
|
|
11647
|
-
this.listCommand = new list_command/* ListCommand */.S(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.collectionService, this.serviceContainer.organizationService, this.serviceContainer.searchService, this.serviceContainer.organizationUserApiService, this.serviceContainer.apiService, this.serviceContainer.eventCollectionService);
|
|
11713
|
+
this.listCommand = new list_command/* ListCommand */.S(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.collectionService, this.serviceContainer.organizationService, this.serviceContainer.searchService, this.serviceContainer.organizationUserApiService, this.serviceContainer.apiService, this.serviceContainer.eventCollectionService, this.serviceContainer.accountService);
|
|
11648
11714
|
this.createCommand = new create_command/* CreateCommand */.K(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.keyService, this.serviceContainer.encryptService, this.serviceContainer.apiService, this.serviceContainer.folderApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.organizationService, this.serviceContainer.accountService);
|
|
11649
11715
|
this.editCommand = new edit_command/* EditCommand */.s(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.keyService, this.serviceContainer.encryptService, this.serviceContainer.apiService, this.serviceContainer.folderApiService, this.serviceContainer.accountService);
|
|
11650
11716
|
this.generateCommand = new generate_command/* GenerateCommand */.p(this.serviceContainer.passwordGenerationService, this.serviceContainer.stateService);
|
|
11651
11717
|
this.syncCommand = new sync_command/* SyncCommand */.b(this.serviceContainer.syncService);
|
|
11652
11718
|
this.statusCommand = new status_command/* StatusCommand */.y(this.serviceContainer.environmentService, this.serviceContainer.syncService, this.serviceContainer.accountService, this.serviceContainer.authService);
|
|
11653
|
-
this.deleteCommand = new delete_command/* DeleteCommand */.R(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.apiService, this.serviceContainer.folderApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.cipherAuthorizationService);
|
|
11719
|
+
this.deleteCommand = new delete_command/* DeleteCommand */.R(this.serviceContainer.cipherService, this.serviceContainer.folderService, this.serviceContainer.apiService, this.serviceContainer.folderApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.cipherAuthorizationService, this.serviceContainer.accountService);
|
|
11654
11720
|
this.confirmCommand = new confirm_command/* ConfirmCommand */.u(this.serviceContainer.apiService, this.serviceContainer.keyService, this.serviceContainer.encryptService, this.serviceContainer.organizationUserApiService);
|
|
11655
11721
|
this.restoreCommand = new restore_command/* RestoreCommand */.G(this.serviceContainer.cipherService);
|
|
11656
11722
|
this.shareCommand = new share_command/* ShareCommand */.j(this.serviceContainer.cipherService, this.serviceContainer.accountService);
|
|
11657
11723
|
this.lockCommand = new lock_command/* LockCommand */.z(this.serviceContainer.vaultTimeoutService);
|
|
11658
11724
|
this.unlockCommand = new unlock_command/* UnlockCommand */.o(this.serviceContainer.accountService, this.serviceContainer.masterPasswordService, this.serviceContainer.keyService, this.serviceContainer.userVerificationService, this.serviceContainer.cryptoFunctionService, this.serviceContainer.logService, this.serviceContainer.keyConnectorService, this.serviceContainer.environmentService, this.serviceContainer.syncService, this.serviceContainer.organizationApiService, () => __awaiter(this, void 0, void 0, function* () { return yield this.serviceContainer.logout(); }));
|
|
11659
|
-
this.sendCreateCommand = new commands/* SendCreateCommand */.QR(this.serviceContainer.sendService, this.serviceContainer.environmentService, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService);
|
|
11725
|
+
this.sendCreateCommand = new commands/* SendCreateCommand */.QR(this.serviceContainer.sendService, this.serviceContainer.environmentService, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.accountService);
|
|
11660
11726
|
this.sendDeleteCommand = new commands/* SendDeleteCommand */.Rg(this.serviceContainer.sendService, this.serviceContainer.sendApiService);
|
|
11661
11727
|
this.sendGetCommand = new commands/* SendGetCommand */.MA(this.serviceContainer.sendService, this.serviceContainer.environmentService, this.serviceContainer.searchService, this.serviceContainer.encryptService, this.serviceContainer.apiService);
|
|
11662
|
-
this.sendEditCommand = new commands/* SendEditCommand */._s(this.serviceContainer.sendService, this.sendGetCommand, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService);
|
|
11728
|
+
this.sendEditCommand = new commands/* SendEditCommand */._s(this.serviceContainer.sendService, this.sendGetCommand, this.serviceContainer.sendApiService, this.serviceContainer.billingAccountProfileStateService, this.serviceContainer.accountService);
|
|
11663
11729
|
this.sendListCommand = new commands/* SendListCommand */.eK(this.serviceContainer.sendService, this.serviceContainer.environmentService, this.serviceContainer.searchService);
|
|
11664
11730
|
this.sendRemovePasswordCommand = new commands/* SendRemovePasswordCommand */.Vx(this.serviceContainer.sendService, this.serviceContainer.sendApiService, this.serviceContainer.environmentService);
|
|
11665
11731
|
}
|
|
@@ -14007,6 +14073,8 @@ var login_email_service_awaiter = (undefined && undefined.__awaiter) || function
|
|
|
14007
14073
|
// @ts-strict-ignore
|
|
14008
14074
|
|
|
14009
14075
|
|
|
14076
|
+
// FIXME: remove `src` and fix import
|
|
14077
|
+
// eslint-disable-next-line no-restricted-imports
|
|
14010
14078
|
|
|
14011
14079
|
const LOGIN_EMAIL = new state/* KeyDefinition */.Zs(state/* LOGIN_EMAIL_MEMORY */.jB, "loginEmail", {
|
|
14012
14080
|
deserializer: (value) => value,
|
|
@@ -14093,8 +14161,8 @@ class PreloginRequest {
|
|
|
14093
14161
|
var error_response = __webpack_require__(6057);
|
|
14094
14162
|
// EXTERNAL MODULE: ../../libs/common/src/platform/scheduling/index.ts + 2 modules
|
|
14095
14163
|
var scheduling = __webpack_require__(7143);
|
|
14096
|
-
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts +
|
|
14097
|
-
var src = __webpack_require__(
|
|
14164
|
+
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts + 20 modules
|
|
14165
|
+
var src = __webpack_require__(5907);
|
|
14098
14166
|
// EXTERNAL MODULE: ../../libs/common/src/auth/models/request/identity-token/device.request.ts
|
|
14099
14167
|
var device_request = __webpack_require__(5961);
|
|
14100
14168
|
// EXTERNAL MODULE: ../../libs/common/src/auth/models/request/identity-token/token.request.ts
|
|
@@ -14532,8 +14600,8 @@ class AuthRequestLoginStrategy extends LoginStrategy {
|
|
|
14532
14600
|
|
|
14533
14601
|
// EXTERNAL MODULE: ../../libs/common/src/admin-console/models/domain/master-password-policy-options.ts
|
|
14534
14602
|
var master_password_policy_options = __webpack_require__(9021);
|
|
14535
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts +
|
|
14536
|
-
var platform_enums = __webpack_require__(
|
|
14603
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
14604
|
+
var platform_enums = __webpack_require__(5874);
|
|
14537
14605
|
;// ../../libs/auth/src/common/login-strategies/password-login.strategy.ts
|
|
14538
14606
|
var password_login_strategy_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14539
14607
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -16815,12 +16883,14 @@ class OrganizationApiService {
|
|
|
16815
16883
|
}
|
|
16816
16884
|
updatePasswordManagerSeats(id, request) {
|
|
16817
16885
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16818
|
-
|
|
16886
|
+
const r = yield this.apiService.send("POST", "/organizations/" + id + "/subscription", request, true, true);
|
|
16887
|
+
return new profile_organization_response/* ProfileOrganizationResponse */.C(r);
|
|
16819
16888
|
});
|
|
16820
16889
|
}
|
|
16821
16890
|
updateSecretsManagerSubscription(id, request) {
|
|
16822
16891
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16823
|
-
|
|
16892
|
+
const r = yield this.apiService.send("POST", "/organizations/" + id + "/sm-subscription", request, true, true);
|
|
16893
|
+
return new profile_organization_response/* ProfileOrganizationResponse */.C(r);
|
|
16824
16894
|
});
|
|
16825
16895
|
}
|
|
16826
16896
|
updateSeats(id, request) {
|
|
@@ -18785,8 +18855,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
18785
18855
|
|
|
18786
18856
|
// EXTERNAL MODULE: external "rxjs"
|
|
18787
18857
|
var external_rxjs_ = __webpack_require__(573);
|
|
18788
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts +
|
|
18789
|
-
var enums = __webpack_require__(
|
|
18858
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
18859
|
+
var enums = __webpack_require__(5874);
|
|
18790
18860
|
// EXTERNAL MODULE: ../../libs/common/src/platform/models/domain/enc-string.ts
|
|
18791
18861
|
var enc_string = __webpack_require__(6505);
|
|
18792
18862
|
// EXTERNAL MODULE: ../../libs/common/src/platform/models/domain/symmetric-crypto-key.ts
|
|
@@ -19086,6 +19156,8 @@ class DeviceResponse extends base_response/* BaseResponse */.r {
|
|
|
19086
19156
|
this.type = this.getResponseProperty("Type");
|
|
19087
19157
|
this.creationDate = this.getResponseProperty("CreationDate");
|
|
19088
19158
|
this.revisionDate = this.getResponseProperty("RevisionDate");
|
|
19159
|
+
this.isTrusted = this.getResponseProperty("IsTrusted");
|
|
19160
|
+
this.devicePendingAuthRequest = this.getResponseProperty("DevicePendingAuthRequest");
|
|
19089
19161
|
}
|
|
19090
19162
|
}
|
|
19091
19163
|
|
|
@@ -19191,6 +19263,11 @@ class DevicesApiServiceImplementation {
|
|
|
19191
19263
|
});
|
|
19192
19264
|
});
|
|
19193
19265
|
}
|
|
19266
|
+
deactivateDevice(deviceId) {
|
|
19267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19268
|
+
yield this.apiService.send("POST", `/devices/${deviceId}/deactivate`, null, true, false);
|
|
19269
|
+
});
|
|
19270
|
+
}
|
|
19194
19271
|
}
|
|
19195
19272
|
|
|
19196
19273
|
|
|
@@ -19209,8 +19286,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
19209
19286
|
|
|
19210
19287
|
// EXTERNAL MODULE: external "rxjs"
|
|
19211
19288
|
var external_rxjs_ = __webpack_require__(573);
|
|
19212
|
-
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts +
|
|
19213
|
-
var src = __webpack_require__(
|
|
19289
|
+
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts + 20 modules
|
|
19290
|
+
var src = __webpack_require__(5907);
|
|
19214
19291
|
// EXTERNAL MODULE: ../../libs/common/src/admin-console/enums/index.ts + 10 modules
|
|
19215
19292
|
var enums = __webpack_require__(2887);
|
|
19216
19293
|
// EXTERNAL MODULE: ../../libs/common/src/models/request/keys.request.ts
|
|
@@ -19406,7 +19483,7 @@ class KeyConnectorService {
|
|
|
19406
19483
|
/* harmony export */ });
|
|
19407
19484
|
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(573);
|
|
19408
19485
|
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rxjs__WEBPACK_IMPORTED_MODULE_0__);
|
|
19409
|
-
/* harmony import */ var _platform_enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
19486
|
+
/* harmony import */ var _platform_enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5874);
|
|
19410
19487
|
/* harmony import */ var _platform_models_domain_enc_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6505);
|
|
19411
19488
|
/* harmony import */ var _platform_models_domain_symmetric_crypto_key__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7310);
|
|
19412
19489
|
/* harmony import */ var _platform_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1068);
|
|
@@ -19567,11 +19644,11 @@ class MasterPasswordService {
|
|
|
19567
19644
|
}
|
|
19568
19645
|
let decUserKey;
|
|
19569
19646
|
if (userKey.encryptionType === _platform_enums__WEBPACK_IMPORTED_MODULE_1__/* .EncryptionType */ .Qd.AesCbc256_B64) {
|
|
19570
|
-
decUserKey = yield this.encryptService.decryptToBytes(userKey, masterKey);
|
|
19647
|
+
decUserKey = yield this.encryptService.decryptToBytes(userKey, masterKey, "Content: User Key; Encrypting Key: Master Key");
|
|
19571
19648
|
}
|
|
19572
19649
|
else if (userKey.encryptionType === _platform_enums__WEBPACK_IMPORTED_MODULE_1__/* .EncryptionType */ .Qd.AesCbc256_HmacSha256_B64) {
|
|
19573
19650
|
const newKey = yield this.keyGenerationService.stretchKey(masterKey);
|
|
19574
|
-
decUserKey = yield this.encryptService.decryptToBytes(userKey, newKey);
|
|
19651
|
+
decUserKey = yield this.encryptService.decryptToBytes(userKey, newKey, "Content: User Key; Encrypting Key: Stretched Master Key");
|
|
19575
19652
|
}
|
|
19576
19653
|
else {
|
|
19577
19654
|
throw new Error("Unsupported encryption type.");
|
|
@@ -19605,8 +19682,8 @@ var external_rxjs_ = __webpack_require__(573);
|
|
|
19605
19682
|
var common = __webpack_require__(4025);
|
|
19606
19683
|
// EXTERNAL MODULE: ../../libs/common/src/enums/vault-timeout-action.enum.ts
|
|
19607
19684
|
var vault_timeout_action_enum = __webpack_require__(2572);
|
|
19608
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts +
|
|
19609
|
-
var enums = __webpack_require__(
|
|
19685
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
19686
|
+
var enums = __webpack_require__(5874);
|
|
19610
19687
|
// EXTERNAL MODULE: ../../libs/common/src/platform/misc/utils.ts + 2 modules
|
|
19611
19688
|
var utils = __webpack_require__(6948);
|
|
19612
19689
|
// EXTERNAL MODULE: ../../libs/common/src/platform/models/domain/enc-string.ts
|
|
@@ -20714,10 +20791,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
20714
20791
|
|
|
20715
20792
|
// EXTERNAL MODULE: external "rxjs"
|
|
20716
20793
|
var external_rxjs_ = __webpack_require__(573);
|
|
20717
|
-
// EXTERNAL MODULE: ../../libs/
|
|
20718
|
-
var
|
|
20719
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/
|
|
20720
|
-
var
|
|
20794
|
+
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts + 20 modules
|
|
20795
|
+
var src = __webpack_require__(5907);
|
|
20796
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
20797
|
+
var enums = __webpack_require__(5874);
|
|
20721
20798
|
// EXTERNAL MODULE: ../../libs/common/src/auth/enums/verification-type.ts
|
|
20722
20799
|
var verification_type = __webpack_require__(6745);
|
|
20723
20800
|
// EXTERNAL MODULE: ../../libs/common/src/auth/models/request/secret-verification.request.ts
|
|
@@ -20758,7 +20835,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
20758
20835
|
* Use it to verify the input collected by UserVerificationComponent.
|
|
20759
20836
|
*/
|
|
20760
20837
|
class UserVerificationService {
|
|
20761
|
-
constructor(keyService, accountService, masterPasswordService, i18nService, userVerificationApiService, userDecryptionOptionsService, pinService,
|
|
20838
|
+
constructor(keyService, accountService, masterPasswordService, i18nService, userVerificationApiService, userDecryptionOptionsService, pinService, kdfConfigService, biometricsService) {
|
|
20762
20839
|
this.keyService = keyService;
|
|
20763
20840
|
this.accountService = accountService;
|
|
20764
20841
|
this.masterPasswordService = masterPasswordService;
|
|
@@ -20766,21 +20843,18 @@ class UserVerificationService {
|
|
|
20766
20843
|
this.userVerificationApiService = userVerificationApiService;
|
|
20767
20844
|
this.userDecryptionOptionsService = userDecryptionOptionsService;
|
|
20768
20845
|
this.pinService = pinService;
|
|
20769
|
-
this.logService = logService;
|
|
20770
|
-
this.vaultTimeoutSettingsService = vaultTimeoutSettingsService;
|
|
20771
|
-
this.platformUtilsService = platformUtilsService;
|
|
20772
20846
|
this.kdfConfigService = kdfConfigService;
|
|
20847
|
+
this.biometricsService = biometricsService;
|
|
20773
20848
|
}
|
|
20774
20849
|
getAvailableVerificationOptions(verificationType) {
|
|
20775
20850
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20776
20851
|
var _a;
|
|
20777
20852
|
const userId = (_a = (yield (0,external_rxjs_.firstValueFrom)(this.accountService.activeAccount$))) === null || _a === void 0 ? void 0 : _a.id;
|
|
20778
20853
|
if (verificationType === "client") {
|
|
20779
|
-
const [userHasMasterPassword, isPinDecryptionAvailable,
|
|
20854
|
+
const [userHasMasterPassword, isPinDecryptionAvailable, biometricsStatus] = yield Promise.all([
|
|
20780
20855
|
this.hasMasterPasswordAndMasterKeyHash(userId),
|
|
20781
20856
|
this.pinService.isPinDecryptionAvailable(userId),
|
|
20782
|
-
this.
|
|
20783
|
-
this.keyService.hasUserKeyStored(key_suffix_options_enum/* KeySuffixOptions */.h.Biometric, userId),
|
|
20857
|
+
this.biometricsService.getBiometricsStatus(),
|
|
20784
20858
|
]);
|
|
20785
20859
|
// note: we do not need to check this.platformUtilsService.supportsBiometric() because
|
|
20786
20860
|
// we can just use the logic below which works for both desktop & the browser extension.
|
|
@@ -20788,8 +20862,7 @@ class UserVerificationService {
|
|
|
20788
20862
|
client: {
|
|
20789
20863
|
masterPassword: userHasMasterPassword,
|
|
20790
20864
|
pin: isPinDecryptionAvailable,
|
|
20791
|
-
biometrics:
|
|
20792
|
-
(biometricsUserKeyStored || !this.platformUtilsService.supportsSecureStorage()),
|
|
20865
|
+
biometrics: biometricsStatus === src/* BiometricsStatus */.cR.Available,
|
|
20793
20866
|
},
|
|
20794
20867
|
server: {
|
|
20795
20868
|
masterPassword: false,
|
|
@@ -20931,17 +21004,7 @@ class UserVerificationService {
|
|
|
20931
21004
|
}
|
|
20932
21005
|
verifyUserByBiometrics() {
|
|
20933
21006
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20934
|
-
|
|
20935
|
-
// Biometrics crashes and doesn't return a value if the user cancels the prompt
|
|
20936
|
-
try {
|
|
20937
|
-
userKey = yield this.keyService.getUserKeyFromStorage(key_suffix_options_enum/* KeySuffixOptions */.h.Biometric);
|
|
20938
|
-
}
|
|
20939
|
-
catch (e) {
|
|
20940
|
-
this.logService.error(`Biometrics User Verification failed: ${e.message}`);
|
|
20941
|
-
// So, any failures should be treated as a failed verification
|
|
20942
|
-
return false;
|
|
20943
|
-
}
|
|
20944
|
-
return userKey != null;
|
|
21007
|
+
return this.biometricsService.authenticateWithBiometrics();
|
|
20945
21008
|
});
|
|
20946
21009
|
}
|
|
20947
21010
|
requestOTP() {
|
|
@@ -21277,9 +21340,10 @@ class AutofillSettingsService {
|
|
|
21277
21340
|
/* unused harmony export DomainSettingsService */
|
|
21278
21341
|
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(573);
|
|
21279
21342
|
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rxjs__WEBPACK_IMPORTED_MODULE_0__);
|
|
21280
|
-
/* harmony import */ var
|
|
21281
|
-
/* harmony import */ var
|
|
21282
|
-
/* harmony import */ var
|
|
21343
|
+
/* harmony import */ var _bitwarden_common_enums_feature_flag_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3176);
|
|
21344
|
+
/* harmony import */ var _models_domain_domain_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3037);
|
|
21345
|
+
/* harmony import */ var _platform_misc_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6948);
|
|
21346
|
+
/* harmony import */ var _platform_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1068);
|
|
21283
21347
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21284
21348
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21285
21349
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -21295,33 +21359,48 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
21295
21359
|
|
|
21296
21360
|
|
|
21297
21361
|
|
|
21298
|
-
|
|
21362
|
+
|
|
21363
|
+
const SHOW_FAVICONS = new _platform_state__WEBPACK_IMPORTED_MODULE_4__/* .KeyDefinition */ .Zs(_platform_state__WEBPACK_IMPORTED_MODULE_4__/* .DOMAIN_SETTINGS_DISK */ .XH, "showFavicons", {
|
|
21299
21364
|
deserializer: (value) => value !== null && value !== void 0 ? value : true,
|
|
21300
21365
|
});
|
|
21301
|
-
|
|
21366
|
+
// Domain exclusion list for notifications
|
|
21367
|
+
const NEVER_DOMAINS = new _platform_state__WEBPACK_IMPORTED_MODULE_4__/* .KeyDefinition */ .Zs(_platform_state__WEBPACK_IMPORTED_MODULE_4__/* .DOMAIN_SETTINGS_DISK */ .XH, "neverDomains", {
|
|
21302
21368
|
deserializer: (value) => value !== null && value !== void 0 ? value : null,
|
|
21303
21369
|
});
|
|
21304
|
-
|
|
21370
|
+
// Domain exclusion list for content script injections
|
|
21371
|
+
const BLOCKED_INTERACTIONS_URIS = new _platform_state__WEBPACK_IMPORTED_MODULE_4__/* .KeyDefinition */ .Zs(_platform_state__WEBPACK_IMPORTED_MODULE_4__/* .DOMAIN_SETTINGS_DISK */ .XH, "blockedInteractionsUris", {
|
|
21372
|
+
deserializer: (value) => value !== null && value !== void 0 ? value : {},
|
|
21373
|
+
});
|
|
21374
|
+
const EQUIVALENT_DOMAINS = new _platform_state__WEBPACK_IMPORTED_MODULE_4__/* .UserKeyDefinition */ .Ok(_platform_state__WEBPACK_IMPORTED_MODULE_4__/* .DOMAIN_SETTINGS_DISK */ .XH, "equivalentDomains", {
|
|
21305
21375
|
deserializer: (value) => value !== null && value !== void 0 ? value : null,
|
|
21306
21376
|
clearOn: ["logout"],
|
|
21307
21377
|
});
|
|
21308
|
-
const DEFAULT_URI_MATCH_STRATEGY = new
|
|
21309
|
-
deserializer: (value) => value !== null && value !== void 0 ? value :
|
|
21378
|
+
const DEFAULT_URI_MATCH_STRATEGY = new _platform_state__WEBPACK_IMPORTED_MODULE_4__/* .UserKeyDefinition */ .Ok(_platform_state__WEBPACK_IMPORTED_MODULE_4__/* .DOMAIN_SETTINGS_DISK */ .XH, "defaultUriMatchStrategy", {
|
|
21379
|
+
deserializer: (value) => value !== null && value !== void 0 ? value : _models_domain_domain_service__WEBPACK_IMPORTED_MODULE_2__/* .UriMatchStrategy */ .L.Domain,
|
|
21310
21380
|
clearOn: [],
|
|
21311
21381
|
});
|
|
21382
|
+
/**
|
|
21383
|
+
* The Domain Settings service; provides client settings state for "active client view" URI concerns
|
|
21384
|
+
*/
|
|
21312
21385
|
class DomainSettingsService {
|
|
21313
21386
|
}
|
|
21314
21387
|
class DefaultDomainSettingsService {
|
|
21315
|
-
constructor(stateProvider) {
|
|
21388
|
+
constructor(stateProvider, configService) {
|
|
21316
21389
|
this.stateProvider = stateProvider;
|
|
21390
|
+
this.configService = configService;
|
|
21317
21391
|
this.showFaviconsState = this.stateProvider.getGlobal(SHOW_FAVICONS);
|
|
21318
21392
|
this.showFavicons$ = this.showFaviconsState.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((x) => x !== null && x !== void 0 ? x : true));
|
|
21319
21393
|
this.neverDomainsState = this.stateProvider.getGlobal(NEVER_DOMAINS);
|
|
21320
21394
|
this.neverDomains$ = this.neverDomainsState.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((x) => x !== null && x !== void 0 ? x : null));
|
|
21395
|
+
// Needs to be global to prevent pre-login injections
|
|
21396
|
+
this.blockedInteractionsUrisState = this.stateProvider.getGlobal(BLOCKED_INTERACTIONS_URIS);
|
|
21397
|
+
this.blockedInteractionsUris$ = this.configService
|
|
21398
|
+
.getFeatureFlag$(_bitwarden_common_enums_feature_flag_enum__WEBPACK_IMPORTED_MODULE_1__/* .FeatureFlag */ .T.BlockBrowserInjectionsByDomain)
|
|
21399
|
+
.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.switchMap)((featureIsEnabled) => featureIsEnabled ? this.blockedInteractionsUrisState.state$ : (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.of)({})), (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((disabledUris) => (Object.keys(disabledUris).length ? disabledUris : {})));
|
|
21321
21400
|
this.equivalentDomainsState = this.stateProvider.getActive(EQUIVALENT_DOMAINS);
|
|
21322
21401
|
this.equivalentDomains$ = this.equivalentDomainsState.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((x) => x !== null && x !== void 0 ? x : null));
|
|
21323
21402
|
this.defaultUriMatchStrategyState = this.stateProvider.getActive(DEFAULT_URI_MATCH_STRATEGY);
|
|
21324
|
-
this.defaultUriMatchStrategy$ = this.defaultUriMatchStrategyState.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((x) => x !== null && x !== void 0 ? x :
|
|
21403
|
+
this.defaultUriMatchStrategy$ = this.defaultUriMatchStrategyState.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((x) => x !== null && x !== void 0 ? x : _models_domain_domain_service__WEBPACK_IMPORTED_MODULE_2__/* .UriMatchStrategy */ .L.Domain));
|
|
21325
21404
|
}
|
|
21326
21405
|
setShowFavicons(newValue) {
|
|
21327
21406
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -21333,6 +21412,11 @@ class DefaultDomainSettingsService {
|
|
|
21333
21412
|
yield this.neverDomainsState.update(() => newValue);
|
|
21334
21413
|
});
|
|
21335
21414
|
}
|
|
21415
|
+
setBlockedInteractionsUris(newValue) {
|
|
21416
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21417
|
+
yield this.blockedInteractionsUrisState.update(() => newValue);
|
|
21418
|
+
});
|
|
21419
|
+
}
|
|
21336
21420
|
setEquivalentDomains(newValue, userId) {
|
|
21337
21421
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21338
21422
|
yield this.stateProvider.getUser(userId, EQUIVALENT_DOMAINS).update(() => newValue);
|
|
@@ -21345,7 +21429,7 @@ class DefaultDomainSettingsService {
|
|
|
21345
21429
|
}
|
|
21346
21430
|
getUrlEquivalentDomains(url) {
|
|
21347
21431
|
const domains$ = this.equivalentDomains$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((equivalentDomains) => {
|
|
21348
|
-
const domain =
|
|
21432
|
+
const domain = _platform_misc_utils__WEBPACK_IMPORTED_MODULE_3__/* .Utils */ .A.getDomain(url);
|
|
21349
21433
|
if (domain == null || equivalentDomains == null) {
|
|
21350
21434
|
return new Set();
|
|
21351
21435
|
}
|
|
@@ -21367,8 +21451,6 @@ class DefaultDomainSettingsService {
|
|
|
21367
21451
|
/* harmony export */ });
|
|
21368
21452
|
/* unused harmony exports isCardExpired, parseYearMonthExpiry */
|
|
21369
21453
|
/* harmony import */ var _bitwarden_common_autofill_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5396);
|
|
21370
|
-
// FIXME: Update this file to be type safe and remove this and next line
|
|
21371
|
-
// @ts-strict-ignore
|
|
21372
21454
|
|
|
21373
21455
|
/**
|
|
21374
21456
|
* Takes a string or number value and returns a string value formatted as a valid 4-digit year
|
|
@@ -21382,10 +21464,10 @@ function normalizeExpiryYearFormat(yearInput) {
|
|
|
21382
21464
|
const yearInputIsEmpty = yearInput == null || yearInput === "";
|
|
21383
21465
|
let expirationYear = yearInputIsEmpty ? null : `${yearInput}`;
|
|
21384
21466
|
// Exit early if year is already formatted correctly or empty
|
|
21385
|
-
if (yearInputIsEmpty || /^[1-9]{1}\d{3}$/.test(expirationYear)) {
|
|
21467
|
+
if (yearInputIsEmpty || (expirationYear && /^[1-9]{1}\d{3}$/.test(expirationYear))) {
|
|
21386
21468
|
return expirationYear;
|
|
21387
21469
|
}
|
|
21388
|
-
expirationYear = expirationYear
|
|
21470
|
+
expirationYear = (expirationYear || "")
|
|
21389
21471
|
// For safety, because even input[type="number"] will allow decimals
|
|
21390
21472
|
.replace(/[^\d]/g, "")
|
|
21391
21473
|
// remove any leading zero padding (leave the last leading zero if it ends the string)
|
|
@@ -21404,7 +21486,7 @@ function normalizeExpiryYearFormat(yearInput) {
|
|
|
21404
21486
|
}
|
|
21405
21487
|
/**
|
|
21406
21488
|
* Takes a cipher card view and returns "true" if the month and year affirmativey indicate
|
|
21407
|
-
* the card is expired.
|
|
21489
|
+
* the card is expired. Uncertain cases return "false".
|
|
21408
21490
|
*
|
|
21409
21491
|
* @param {CardView} cipherCard
|
|
21410
21492
|
* @return {*} {boolean}
|
|
@@ -21412,21 +21494,31 @@ function normalizeExpiryYearFormat(yearInput) {
|
|
|
21412
21494
|
function isCardExpired(cipherCard) {
|
|
21413
21495
|
if (cipherCard) {
|
|
21414
21496
|
const { expMonth = null, expYear = null } = cipherCard;
|
|
21497
|
+
if (!expYear) {
|
|
21498
|
+
return false;
|
|
21499
|
+
}
|
|
21415
21500
|
const now = new Date();
|
|
21416
21501
|
const normalizedYear = normalizeExpiryYearFormat(expYear);
|
|
21417
|
-
|
|
21418
|
-
|
|
21502
|
+
const parsedYear = normalizedYear ? parseInt(normalizedYear, 10) : NaN;
|
|
21503
|
+
const expiryYearIsBeforeCurrentYear = parsedYear < now.getFullYear();
|
|
21504
|
+
const expiryYearIsAfterCurrentYear = parsedYear > now.getFullYear();
|
|
21505
|
+
// If the expiry year is before the current year, skip checking the month, since it must be expired
|
|
21506
|
+
if (normalizedYear && expiryYearIsBeforeCurrentYear) {
|
|
21419
21507
|
return true;
|
|
21420
21508
|
}
|
|
21509
|
+
// If the expiry year is after the current year, skip checking the month, since it cannot be expired
|
|
21510
|
+
if (normalizedYear && expiryYearIsAfterCurrentYear) {
|
|
21511
|
+
return false;
|
|
21512
|
+
}
|
|
21421
21513
|
if (normalizedYear && expMonth) {
|
|
21422
21514
|
const parsedMonthInteger = parseInt(expMonth, 10);
|
|
21423
|
-
const
|
|
21424
|
-
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
const
|
|
21515
|
+
const parsedMonthIsValid = parsedMonthInteger && !isNaN(parsedMonthInteger);
|
|
21516
|
+
// If the parsed month value is 0, we don't know when the expiry passes this year, so do not treat it as expired
|
|
21517
|
+
if (!parsedMonthIsValid) {
|
|
21518
|
+
return false;
|
|
21519
|
+
}
|
|
21520
|
+
// `Date` months are zero-indexed
|
|
21521
|
+
const parsedMonth = parsedMonthInteger - 1;
|
|
21430
21522
|
// First day of the next month
|
|
21431
21523
|
const cardExpiry = new Date(parsedYear, parsedMonth + 1, 1);
|
|
21432
21524
|
return cardExpiry <= now;
|
|
@@ -21561,9 +21653,14 @@ function parseNonDelimitedYearMonthExpiry(dateInput) {
|
|
|
21561
21653
|
parsedYear = dateInput.slice(0, 2);
|
|
21562
21654
|
parsedMonth = dateInput.slice(-1);
|
|
21563
21655
|
const currentYear = new Date().getFullYear();
|
|
21564
|
-
const
|
|
21565
|
-
const
|
|
21566
|
-
|
|
21656
|
+
const normalizedYearFormat = normalizeExpiryYearFormat(parsedYear);
|
|
21657
|
+
const normalizedParsedYear = normalizedYearFormat && parseInt(normalizedYearFormat, 10);
|
|
21658
|
+
const normalizedExpiryYearFormat = normalizeExpiryYearFormat(dateInput.slice(-2));
|
|
21659
|
+
const normalizedParsedYearAlternative = normalizedExpiryYearFormat && parseInt(normalizedExpiryYearFormat, 10);
|
|
21660
|
+
if (normalizedParsedYear &&
|
|
21661
|
+
normalizedParsedYear < currentYear &&
|
|
21662
|
+
normalizedParsedYearAlternative &&
|
|
21663
|
+
normalizedParsedYearAlternative >= currentYear) {
|
|
21567
21664
|
parsedYear = dateInput.slice(-2);
|
|
21568
21665
|
parsedMonth = dateInput.slice(0, 1);
|
|
21569
21666
|
}
|
|
@@ -21588,16 +21685,20 @@ function parseYearMonthExpiry(combinedExpiryValue) {
|
|
|
21588
21685
|
const sanitizedSecondPart = ((_b = dateParts[1]) === null || _b === void 0 ? void 0 : _b.replace(IrrelevantExpiryCharactersPatternExpression, "")) || "";
|
|
21589
21686
|
// If there is only one date part, no delimiter was found in the passed value
|
|
21590
21687
|
if (dateParts.length === 1) {
|
|
21591
|
-
[
|
|
21688
|
+
const [parsedNonDelimitedYear, parsedNonDelimitedMonth] = parseNonDelimitedYearMonthExpiry(sanitizedFirstPart);
|
|
21689
|
+
parsedYear = parsedNonDelimitedYear;
|
|
21690
|
+
parsedMonth = parsedNonDelimitedMonth;
|
|
21592
21691
|
}
|
|
21593
21692
|
// There are multiple date parts
|
|
21594
21693
|
else {
|
|
21595
|
-
[
|
|
21694
|
+
const [parsedDelimitedYear, parsedDelimitedMonth] = parseDelimitedYearMonthExpiry([
|
|
21596
21695
|
sanitizedFirstPart,
|
|
21597
21696
|
sanitizedSecondPart,
|
|
21598
21697
|
]);
|
|
21698
|
+
parsedYear = parsedDelimitedYear;
|
|
21699
|
+
parsedMonth = parsedDelimitedMonth;
|
|
21599
21700
|
}
|
|
21600
|
-
const normalizedParsedYear = normalizeExpiryYearFormat(parsedYear);
|
|
21701
|
+
const normalizedParsedYear = parsedYear ? normalizeExpiryYearFormat(parsedYear) : null;
|
|
21601
21702
|
const normalizedParsedMonth = parsedMonth === null || parsedMonth === void 0 ? void 0 : parsedMonth.replace(/^0+/, "").slice(0, 2);
|
|
21602
21703
|
// Set "empty" values to null
|
|
21603
21704
|
parsedYear = (normalizedParsedYear === null || normalizedParsedYear === void 0 ? void 0 : normalizedParsedYear.length) ? normalizedParsedYear : null;
|
|
@@ -21945,18 +22046,26 @@ const BILLING_ACCOUNT_PROFILE_KEY_DEFINITION = new _platform_state__WEBPACK_IMPO
|
|
|
21945
22046
|
clearOn: ["logout"],
|
|
21946
22047
|
});
|
|
21947
22048
|
class DefaultBillingAccountProfileStateService {
|
|
21948
|
-
constructor(stateProvider) {
|
|
22049
|
+
constructor(stateProvider, platformUtilsService, apiService) {
|
|
21949
22050
|
this.stateProvider = stateProvider;
|
|
21950
|
-
this.
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
21956
|
-
|
|
21957
|
-
|
|
21958
|
-
|
|
21959
|
-
|
|
22051
|
+
this.platformUtilsService = platformUtilsService;
|
|
22052
|
+
this.apiService = apiService;
|
|
22053
|
+
}
|
|
22054
|
+
hasPremiumFromAnyOrganization$(userId) {
|
|
22055
|
+
return this.stateProvider
|
|
22056
|
+
.getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION)
|
|
22057
|
+
.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((profile) => !!(profile === null || profile === void 0 ? void 0 : profile.hasPremiumFromAnyOrganization)));
|
|
22058
|
+
}
|
|
22059
|
+
hasPremiumPersonally$(userId) {
|
|
22060
|
+
return this.stateProvider
|
|
22061
|
+
.getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION)
|
|
22062
|
+
.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((profile) => !!(profile === null || profile === void 0 ? void 0 : profile.hasPremiumPersonally)));
|
|
22063
|
+
}
|
|
22064
|
+
hasPremiumFromAnySource$(userId) {
|
|
22065
|
+
return this.stateProvider
|
|
22066
|
+
.getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION)
|
|
22067
|
+
.state$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.map)((profile) => (profile === null || profile === void 0 ? void 0 : profile.hasPremiumFromAnyOrganization) === true ||
|
|
22068
|
+
(profile === null || profile === void 0 ? void 0 : profile.hasPremiumPersonally) === true));
|
|
21960
22069
|
}
|
|
21961
22070
|
setHasPremium(hasPremiumPersonally, hasPremiumFromAnyOrganization, userId) {
|
|
21962
22071
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -21968,6 +22077,20 @@ class DefaultBillingAccountProfileStateService {
|
|
|
21968
22077
|
});
|
|
21969
22078
|
});
|
|
21970
22079
|
}
|
|
22080
|
+
canViewSubscription$(userId) {
|
|
22081
|
+
return (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.combineLatest)([
|
|
22082
|
+
this.hasPremiumPersonally$(userId),
|
|
22083
|
+
this.hasPremiumFromAnyOrganization$(userId),
|
|
22084
|
+
]).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__.concatMap)((_a) => __awaiter(this, [_a], void 0, function* ([hasPremiumPersonally, hasPremiumFromOrg]) {
|
|
22085
|
+
const isCloud = !this.platformUtilsService.isSelfHost();
|
|
22086
|
+
let billing = null;
|
|
22087
|
+
if (isCloud) {
|
|
22088
|
+
billing = yield this.apiService.getUserBillingHistory();
|
|
22089
|
+
}
|
|
22090
|
+
const cloudAndBillingHistory = isCloud && !(billing === null || billing === void 0 ? void 0 : billing.hasNoHistory);
|
|
22091
|
+
return hasPremiumPersonally || !hasPremiumFromOrg || cloudAndBillingHistory;
|
|
22092
|
+
})));
|
|
22093
|
+
}
|
|
21971
22094
|
}
|
|
21972
22095
|
|
|
21973
22096
|
|
|
@@ -21977,9 +22100,9 @@ class DefaultBillingAccountProfileStateService {
|
|
|
21977
22100
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
21978
22101
|
|
|
21979
22102
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21980
|
-
/* harmony export */
|
|
22103
|
+
/* harmony export */ b: () => (/* binding */ DeviceType)
|
|
21981
22104
|
/* harmony export */ });
|
|
21982
|
-
/* unused harmony
|
|
22105
|
+
/* unused harmony export DeviceTypeMetadata */
|
|
21983
22106
|
var DeviceType;
|
|
21984
22107
|
(function (DeviceType) {
|
|
21985
22108
|
DeviceType[DeviceType["Android"] = 0] = "Android";
|
|
@@ -22009,20 +22132,34 @@ var DeviceType;
|
|
|
22009
22132
|
DeviceType[DeviceType["MacOsCLI"] = 24] = "MacOsCLI";
|
|
22010
22133
|
DeviceType[DeviceType["LinuxCLI"] = 25] = "LinuxCLI";
|
|
22011
22134
|
})(DeviceType || (DeviceType = {}));
|
|
22012
|
-
const
|
|
22013
|
-
DeviceType.Android,
|
|
22014
|
-
DeviceType.iOS,
|
|
22015
|
-
DeviceType.AndroidAmazon,
|
|
22016
|
-
]
|
|
22017
|
-
|
|
22018
|
-
DeviceType.
|
|
22019
|
-
DeviceType.
|
|
22020
|
-
DeviceType.
|
|
22021
|
-
DeviceType.
|
|
22022
|
-
DeviceType.
|
|
22023
|
-
DeviceType.
|
|
22024
|
-
DeviceType.
|
|
22025
|
-
]
|
|
22135
|
+
const DeviceTypeMetadata = {
|
|
22136
|
+
[DeviceType.Android]: { category: "mobile", platform: "Android" },
|
|
22137
|
+
[DeviceType.iOS]: { category: "mobile", platform: "iOS" },
|
|
22138
|
+
[DeviceType.AndroidAmazon]: { category: "mobile", platform: "Amazon" },
|
|
22139
|
+
[DeviceType.ChromeExtension]: { category: "extension", platform: "Chrome" },
|
|
22140
|
+
[DeviceType.FirefoxExtension]: { category: "extension", platform: "Firefox" },
|
|
22141
|
+
[DeviceType.OperaExtension]: { category: "extension", platform: "Opera" },
|
|
22142
|
+
[DeviceType.EdgeExtension]: { category: "extension", platform: "Edge" },
|
|
22143
|
+
[DeviceType.VivaldiExtension]: { category: "extension", platform: "Vivaldi" },
|
|
22144
|
+
[DeviceType.SafariExtension]: { category: "extension", platform: "Safari" },
|
|
22145
|
+
[DeviceType.ChromeBrowser]: { category: "webVault", platform: "Chrome" },
|
|
22146
|
+
[DeviceType.FirefoxBrowser]: { category: "webVault", platform: "Firefox" },
|
|
22147
|
+
[DeviceType.OperaBrowser]: { category: "webVault", platform: "Opera" },
|
|
22148
|
+
[DeviceType.EdgeBrowser]: { category: "webVault", platform: "Edge" },
|
|
22149
|
+
[DeviceType.IEBrowser]: { category: "webVault", platform: "IE" },
|
|
22150
|
+
[DeviceType.SafariBrowser]: { category: "webVault", platform: "Safari" },
|
|
22151
|
+
[DeviceType.VivaldiBrowser]: { category: "webVault", platform: "Vivaldi" },
|
|
22152
|
+
[DeviceType.UnknownBrowser]: { category: "webVault", platform: "Unknown" },
|
|
22153
|
+
[DeviceType.WindowsDesktop]: { category: "desktop", platform: "Windows" },
|
|
22154
|
+
[DeviceType.MacOsDesktop]: { category: "desktop", platform: "macOS" },
|
|
22155
|
+
[DeviceType.LinuxDesktop]: { category: "desktop", platform: "Linux" },
|
|
22156
|
+
[DeviceType.UWP]: { category: "desktop", platform: "Windows UWP" },
|
|
22157
|
+
[DeviceType.WindowsCLI]: { category: "cli", platform: "Windows" },
|
|
22158
|
+
[DeviceType.MacOsCLI]: { category: "cli", platform: "macOS" },
|
|
22159
|
+
[DeviceType.LinuxCLI]: { category: "cli", platform: "Linux" },
|
|
22160
|
+
[DeviceType.SDK]: { category: "sdk", platform: "" },
|
|
22161
|
+
[DeviceType.Server]: { category: "server", platform: "" },
|
|
22162
|
+
};
|
|
22026
22163
|
|
|
22027
22164
|
|
|
22028
22165
|
/***/ }),
|
|
@@ -22064,6 +22201,7 @@ var FeatureFlag;
|
|
|
22064
22201
|
FeatureFlag["SSHKeyVaultItem"] = "ssh-key-vault-item";
|
|
22065
22202
|
FeatureFlag["SSHAgent"] = "ssh-agent";
|
|
22066
22203
|
FeatureFlag["NotificationBarAddLoginImprovements"] = "notification-bar-add-login-improvements";
|
|
22204
|
+
FeatureFlag["BlockBrowserInjectionsByDomain"] = "block-browser-injections-by-domain";
|
|
22067
22205
|
FeatureFlag["AC2476_DeprecateStripeSourcesAPI"] = "AC-2476-deprecate-stripe-sources-api";
|
|
22068
22206
|
FeatureFlag["CipherKeyEncryption"] = "cipher-key-encryption";
|
|
22069
22207
|
FeatureFlag["VerifiedSsoDomainEndpoint"] = "pm-12337-refactor-sso-details-endpoint";
|
|
@@ -22080,6 +22218,7 @@ var FeatureFlag;
|
|
|
22080
22218
|
FeatureFlag["PM11360RemoveProviderExportPermission"] = "pm-11360-remove-provider-export-permission";
|
|
22081
22219
|
FeatureFlag["PM12443RemovePagingLogic"] = "pm-12443-remove-paging-logic";
|
|
22082
22220
|
FeatureFlag["PrivateKeyRegeneration"] = "pm-12241-private-key-regeneration";
|
|
22221
|
+
FeatureFlag["ResellerManagedOrgAlert"] = "PM-15814-alert-owners-of-reseller-managed-orgs";
|
|
22083
22222
|
})(FeatureFlag || (FeatureFlag = {}));
|
|
22084
22223
|
// Helper to ensure the value is treated as a boolean.
|
|
22085
22224
|
const FALSE = false;
|
|
@@ -22113,6 +22252,7 @@ const DefaultFeatureFlagValue = {
|
|
|
22113
22252
|
[FeatureFlag.SSHKeyVaultItem]: FALSE,
|
|
22114
22253
|
[FeatureFlag.SSHAgent]: FALSE,
|
|
22115
22254
|
[FeatureFlag.NotificationBarAddLoginImprovements]: FALSE,
|
|
22255
|
+
[FeatureFlag.BlockBrowserInjectionsByDomain]: FALSE,
|
|
22116
22256
|
[FeatureFlag.AC2476_DeprecateStripeSourcesAPI]: FALSE,
|
|
22117
22257
|
[FeatureFlag.CipherKeyEncryption]: FALSE,
|
|
22118
22258
|
[FeatureFlag.VerifiedSsoDomainEndpoint]: FALSE,
|
|
@@ -22129,6 +22269,7 @@ const DefaultFeatureFlagValue = {
|
|
|
22129
22269
|
[FeatureFlag.PM11360RemoveProviderExportPermission]: FALSE,
|
|
22130
22270
|
[FeatureFlag.PM12443RemovePagingLogic]: FALSE,
|
|
22131
22271
|
[FeatureFlag.PrivateKeyRegeneration]: FALSE,
|
|
22272
|
+
[FeatureFlag.ResellerManagedOrgAlert]: FALSE,
|
|
22132
22273
|
};
|
|
22133
22274
|
|
|
22134
22275
|
|
|
@@ -22141,12 +22282,12 @@ const DefaultFeatureFlagValue = {
|
|
|
22141
22282
|
// EXPORTS
|
|
22142
22283
|
__webpack_require__.d(__webpack_exports__, {
|
|
22143
22284
|
sK: () => (/* reexport */ ClientType),
|
|
22144
|
-
bq: () => (/* reexport */ device_type_enum/* DeviceType */.
|
|
22285
|
+
bq: () => (/* reexport */ device_type_enum/* DeviceType */.b),
|
|
22145
22286
|
Bx: () => (/* reexport */ EventType),
|
|
22146
22287
|
kG: () => (/* reexport */ HttpStatusCode)
|
|
22147
22288
|
});
|
|
22148
22289
|
|
|
22149
|
-
// UNUSED EXPORTS:
|
|
22290
|
+
// UNUSED EXPORTS: DeviceTypeMetadata, EventSystemUser, IntegrationType, NativeMessagingVersion, NotificationType
|
|
22150
22291
|
|
|
22151
22292
|
;// ../../libs/common/src/enums/client-type.enum.ts
|
|
22152
22293
|
var ClientType;
|
|
@@ -22630,6 +22771,7 @@ var NotificationType;
|
|
|
22630
22771
|
NotificationType[NotificationType["AuthRequestResponse"] = 16] = "AuthRequestResponse";
|
|
22631
22772
|
NotificationType[NotificationType["SyncOrganizations"] = 17] = "SyncOrganizations";
|
|
22632
22773
|
NotificationType[NotificationType["SyncOrganizationStatusChanged"] = 18] = "SyncOrganizationStatusChanged";
|
|
22774
|
+
NotificationType[NotificationType["SyncOrganizationCollectionSettingChanged"] = 19] = "SyncOrganizationCollectionSettingChanged";
|
|
22633
22775
|
})(NotificationType || (NotificationType = {}));
|
|
22634
22776
|
|
|
22635
22777
|
;// ../../libs/common/src/enums/index.ts
|
|
@@ -24007,7 +24149,7 @@ class AbstractStorageService {
|
|
|
24007
24149
|
|
|
24008
24150
|
/***/ }),
|
|
24009
24151
|
|
|
24010
|
-
/***/
|
|
24152
|
+
/***/ 5874:
|
|
24011
24153
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24012
24154
|
|
|
24013
24155
|
|
|
@@ -24018,7 +24160,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24018
24160
|
K9: () => (/* reexport */ FileUploadType),
|
|
24019
24161
|
VK: () => (/* reexport */ HashPurpose),
|
|
24020
24162
|
EO: () => (/* reexport */ HtmlStorageLocation),
|
|
24021
|
-
hq: () => (/* reexport */
|
|
24163
|
+
hq: () => (/* reexport */ KeySuffixOptions),
|
|
24022
24164
|
xk: () => (/* reexport */ log_level_type_enum/* LogLevelType */.x),
|
|
24023
24165
|
$B: () => (/* reexport */ StorageLocation),
|
|
24024
24166
|
QX: () => (/* reexport */ encryptionTypeToString)
|
|
@@ -24092,8 +24234,13 @@ var HtmlStorageLocation;
|
|
|
24092
24234
|
HtmlStorageLocation["Session"] = "session";
|
|
24093
24235
|
})(HtmlStorageLocation || (HtmlStorageLocation = {}));
|
|
24094
24236
|
|
|
24095
|
-
|
|
24096
|
-
var
|
|
24237
|
+
;// ../../libs/common/src/platform/enums/key-suffix-options.enum.ts
|
|
24238
|
+
var KeySuffixOptions;
|
|
24239
|
+
(function (KeySuffixOptions) {
|
|
24240
|
+
KeySuffixOptions["Auto"] = "auto";
|
|
24241
|
+
KeySuffixOptions["Pin"] = "pin";
|
|
24242
|
+
})(KeySuffixOptions || (KeySuffixOptions = {}));
|
|
24243
|
+
|
|
24097
24244
|
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/log-level-type.enum.ts
|
|
24098
24245
|
var log_level_type_enum = __webpack_require__(8357);
|
|
24099
24246
|
;// ../../libs/common/src/platform/enums/storage-location.enum.ts
|
|
@@ -24135,22 +24282,6 @@ const ThemeTypes = {
|
|
|
24135
24282
|
|
|
24136
24283
|
|
|
24137
24284
|
|
|
24138
|
-
/***/ }),
|
|
24139
|
-
|
|
24140
|
-
/***/ 9377:
|
|
24141
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24142
|
-
|
|
24143
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24144
|
-
/* harmony export */ h: () => (/* binding */ KeySuffixOptions)
|
|
24145
|
-
/* harmony export */ });
|
|
24146
|
-
var KeySuffixOptions;
|
|
24147
|
-
(function (KeySuffixOptions) {
|
|
24148
|
-
KeySuffixOptions["Auto"] = "auto";
|
|
24149
|
-
KeySuffixOptions["Biometric"] = "biometric";
|
|
24150
|
-
KeySuffixOptions["Pin"] = "pin";
|
|
24151
|
-
})(KeySuffixOptions || (KeySuffixOptions = {}));
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
24285
|
/***/ }),
|
|
24155
24286
|
|
|
24156
24287
|
/***/ 8357:
|
|
@@ -32932,7 +33063,7 @@ class Domain {
|
|
|
32932
33063
|
}
|
|
32933
33064
|
}
|
|
32934
33065
|
decryptObj(viewModel_1, map_1, orgId_1) {
|
|
32935
|
-
return __awaiter(this, arguments, void 0, function* (viewModel, map, orgId, key = null) {
|
|
33066
|
+
return __awaiter(this, arguments, void 0, function* (viewModel, map, orgId, key = null, objectContext = "No Domain Context") {
|
|
32936
33067
|
const promises = [];
|
|
32937
33068
|
const self = this;
|
|
32938
33069
|
for (const prop in map) {
|
|
@@ -32945,7 +33076,7 @@ class Domain {
|
|
|
32945
33076
|
.then(() => {
|
|
32946
33077
|
const mapProp = map[theProp] || theProp;
|
|
32947
33078
|
if (self[mapProp]) {
|
|
32948
|
-
return self[mapProp].decrypt(orgId, key);
|
|
33079
|
+
return self[mapProp].decrypt(orgId, key, `Property: ${prop}; ObjectContext: ${objectContext}`);
|
|
32949
33080
|
}
|
|
32950
33081
|
return null;
|
|
32951
33082
|
})
|
|
@@ -32972,11 +33103,11 @@ class Domain {
|
|
|
32972
33103
|
* @returns An object with the requested properties decrypted and the rest of the domain object untouched.
|
|
32973
33104
|
*/
|
|
32974
33105
|
decryptObjWithKey(encryptedProperties_1, key_1, encryptService_1) {
|
|
32975
|
-
return __awaiter(this, arguments, void 0, function* (encryptedProperties, key, encryptService, _ = this.constructor) {
|
|
33106
|
+
return __awaiter(this, arguments, void 0, function* (encryptedProperties, key, encryptService, _ = this.constructor, objectContext = "No Domain Context") {
|
|
32976
33107
|
const promises = [];
|
|
32977
33108
|
for (const prop of encryptedProperties) {
|
|
32978
33109
|
const value = this[prop];
|
|
32979
|
-
promises.push(this.decryptProperty(prop, value, key, encryptService));
|
|
33110
|
+
promises.push(this.decryptProperty(prop, value, key, encryptService, `Property: ${prop.toString()}; ObjectContext: ${objectContext}`));
|
|
32980
33111
|
}
|
|
32981
33112
|
const decryptedObjects = yield Promise.all(promises);
|
|
32982
33113
|
const decryptedObject = decryptedObjects.reduce((acc, obj) => {
|
|
@@ -32985,11 +33116,11 @@ class Domain {
|
|
|
32985
33116
|
return decryptedObject;
|
|
32986
33117
|
});
|
|
32987
33118
|
}
|
|
32988
|
-
decryptProperty(propertyKey, value, key, encryptService) {
|
|
33119
|
+
decryptProperty(propertyKey, value, key, encryptService, decryptTrace) {
|
|
32989
33120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32990
33121
|
let decrypted = null;
|
|
32991
33122
|
if (value) {
|
|
32992
|
-
decrypted = yield value.decryptWithKey(key, encryptService);
|
|
33123
|
+
decrypted = yield value.decryptWithKey(key, encryptService, decryptTrace);
|
|
32993
33124
|
}
|
|
32994
33125
|
else {
|
|
32995
33126
|
decrypted = null;
|
|
@@ -33011,7 +33142,7 @@ class Domain {
|
|
|
33011
33142
|
/* harmony export */ q: () => (/* binding */ EncArrayBuffer)
|
|
33012
33143
|
/* harmony export */ });
|
|
33013
33144
|
/* harmony import */ var _platform_misc_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6948);
|
|
33014
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
33145
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5874);
|
|
33015
33146
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
33016
33147
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
33017
33148
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -33092,7 +33223,7 @@ class EncArrayBuffer {
|
|
|
33092
33223
|
/* harmony export */ k: () => (/* binding */ EncString)
|
|
33093
33224
|
/* harmony export */ });
|
|
33094
33225
|
/* unused harmony export DECRYPT_ERROR */
|
|
33095
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
33226
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5874);
|
|
33096
33227
|
/* harmony import */ var _misc_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6948);
|
|
33097
33228
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
33098
33229
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -33219,21 +33350,21 @@ class EncString {
|
|
|
33219
33350
|
return _enums__WEBPACK_IMPORTED_MODULE_0__/* .EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE */ .iS[encType] === encPieces.length;
|
|
33220
33351
|
}
|
|
33221
33352
|
decrypt(orgId_1) {
|
|
33222
|
-
return __awaiter(this, arguments, void 0, function* (orgId, key = null) {
|
|
33353
|
+
return __awaiter(this, arguments, void 0, function* (orgId, key = null, context) {
|
|
33223
33354
|
if (this.decryptedValue != null) {
|
|
33224
33355
|
return this.decryptedValue;
|
|
33225
33356
|
}
|
|
33226
|
-
let
|
|
33357
|
+
let decryptTrace = "provided-key";
|
|
33227
33358
|
try {
|
|
33228
33359
|
if (key == null) {
|
|
33229
33360
|
key = yield this.getKeyForDecryption(orgId);
|
|
33230
|
-
|
|
33361
|
+
decryptTrace = orgId == null ? `domain-orgkey-${orgId}` : "domain-userkey|masterkey";
|
|
33231
33362
|
if (orgId != null) {
|
|
33232
|
-
|
|
33363
|
+
decryptTrace = `domain-orgkey-${orgId}`;
|
|
33233
33364
|
}
|
|
33234
33365
|
else {
|
|
33235
33366
|
const cryptoService = _misc_utils__WEBPACK_IMPORTED_MODULE_1__/* .Utils */ .A.getContainerService().getKeyService();
|
|
33236
|
-
|
|
33367
|
+
decryptTrace =
|
|
33237
33368
|
(yield cryptoService.getUserKey()) == null
|
|
33238
33369
|
? "domain-withlegacysupport-masterkey"
|
|
33239
33370
|
: "domain-withlegacysupport-userkey";
|
|
@@ -33243,7 +33374,7 @@ class EncString {
|
|
|
33243
33374
|
throw new Error("No key to decrypt EncString with orgId " + orgId);
|
|
33244
33375
|
}
|
|
33245
33376
|
const encryptService = _misc_utils__WEBPACK_IMPORTED_MODULE_1__/* .Utils */ .A.getContainerService().getEncryptService();
|
|
33246
|
-
this.decryptedValue = yield encryptService.decryptToUtf8(this, key,
|
|
33377
|
+
this.decryptedValue = yield encryptService.decryptToUtf8(this, key, decryptTrace == null ? context : `${decryptTrace}${context || ""}`);
|
|
33247
33378
|
}
|
|
33248
33379
|
catch (e) {
|
|
33249
33380
|
this.decryptedValue = DECRYPT_ERROR;
|
|
@@ -33251,13 +33382,13 @@ class EncString {
|
|
|
33251
33382
|
return this.decryptedValue;
|
|
33252
33383
|
});
|
|
33253
33384
|
}
|
|
33254
|
-
decryptWithKey(
|
|
33255
|
-
return __awaiter(this,
|
|
33385
|
+
decryptWithKey(key_1, encryptService_1) {
|
|
33386
|
+
return __awaiter(this, arguments, void 0, function* (key, encryptService, decryptTrace = "domain-withkey") {
|
|
33256
33387
|
try {
|
|
33257
33388
|
if (key == null) {
|
|
33258
33389
|
throw new Error("No key to decrypt EncString");
|
|
33259
33390
|
}
|
|
33260
|
-
this.decryptedValue = yield encryptService.decryptToUtf8(this, key,
|
|
33391
|
+
this.decryptedValue = yield encryptService.decryptToUtf8(this, key, decryptTrace);
|
|
33261
33392
|
}
|
|
33262
33393
|
catch (e) {
|
|
33263
33394
|
this.decryptedValue = DECRYPT_ERROR;
|
|
@@ -33313,7 +33444,7 @@ class ServerSettings {
|
|
|
33313
33444
|
/* harmony export */ e: () => (/* binding */ SymmetricCryptoKey)
|
|
33314
33445
|
/* harmony export */ });
|
|
33315
33446
|
/* harmony import */ var _platform_misc_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6948);
|
|
33316
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
33447
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5874);
|
|
33317
33448
|
|
|
33318
33449
|
|
|
33319
33450
|
class SymmetricCryptoKey {
|
|
@@ -33349,12 +33480,8 @@ class SymmetricCryptoKey {
|
|
|
33349
33480
|
else {
|
|
33350
33481
|
throw new Error("Unsupported encType/key length.");
|
|
33351
33482
|
}
|
|
33352
|
-
|
|
33353
|
-
|
|
33354
|
-
}
|
|
33355
|
-
if (this.encKey != null) {
|
|
33356
|
-
this.encKeyB64 = _platform_misc_utils__WEBPACK_IMPORTED_MODULE_0__/* .Utils */ .A.fromBufferToB64(this.encKey);
|
|
33357
|
-
}
|
|
33483
|
+
this.keyB64 = _platform_misc_utils__WEBPACK_IMPORTED_MODULE_0__/* .Utils */ .A.fromBufferToB64(this.key);
|
|
33484
|
+
this.encKeyB64 = _platform_misc_utils__WEBPACK_IMPORTED_MODULE_0__/* .Utils */ .A.fromBufferToB64(this.encKey);
|
|
33358
33485
|
if (this.macKey != null) {
|
|
33359
33486
|
this.macKeyB64 = _platform_misc_utils__WEBPACK_IMPORTED_MODULE_0__/* .Utils */ .A.fromBufferToB64(this.macKey);
|
|
33360
33487
|
}
|
|
@@ -33835,10 +33962,6 @@ class DefaultConfigService {
|
|
|
33835
33962
|
return this.serverConfig$.pipe((0,external_rxjs_.map)((serverConfig) => this.getFeatureFlagValue(serverConfig, key)));
|
|
33836
33963
|
}
|
|
33837
33964
|
getFeatureFlagValue(serverConfig, flag) {
|
|
33838
|
-
// bodge the extension refresh flag since it's only partially removed
|
|
33839
|
-
if (flag === "extension-refresh") {
|
|
33840
|
-
return true;
|
|
33841
|
-
}
|
|
33842
33965
|
if ((serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.featureStates) == null || serverConfig.featureStates[flag] == null) {
|
|
33843
33966
|
return feature_flag_enum/* DefaultFeatureFlagValue */.z[flag];
|
|
33844
33967
|
}
|
|
@@ -34034,8 +34157,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
34034
34157
|
|
|
34035
34158
|
// EXTERNAL MODULE: ../../libs/common/src/platform/misc/utils.ts + 2 modules
|
|
34036
34159
|
var utils = __webpack_require__(6948);
|
|
34037
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts +
|
|
34038
|
-
var enums = __webpack_require__(
|
|
34160
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
34161
|
+
var enums = __webpack_require__(5874);
|
|
34039
34162
|
// EXTERNAL MODULE: ../../libs/common/src/platform/models/domain/enc-array-buffer.ts
|
|
34040
34163
|
var enc_array_buffer = __webpack_require__(9230);
|
|
34041
34164
|
// EXTERNAL MODULE: ../../libs/common/src/platform/models/domain/enc-string.ts
|
|
@@ -34138,7 +34261,7 @@ class EncryptServiceImplementation {
|
|
|
34138
34261
|
const computedMac = yield this.cryptoFunctionService.hmacFast(fastParams.macData, fastParams.macKey, "sha256");
|
|
34139
34262
|
const macsEqual = yield this.cryptoFunctionService.compareFast(fastParams.mac, computedMac);
|
|
34140
34263
|
if (!macsEqual) {
|
|
34141
|
-
this.logMacFailed("[Encrypt service] MAC comparison failed. Key or payload has changed. Key type " +
|
|
34264
|
+
this.logMacFailed("[Encrypt service] decryptToUtf8 MAC comparison failed. Key or payload has changed. Key type " +
|
|
34142
34265
|
(0,enums/* encryptionTypeToString */.QX)(key.encType) +
|
|
34143
34266
|
"Payload type " +
|
|
34144
34267
|
(0,enums/* encryptionTypeToString */.QX)(encString.encryptionType) +
|
|
@@ -34147,11 +34270,11 @@ class EncryptServiceImplementation {
|
|
|
34147
34270
|
return null;
|
|
34148
34271
|
}
|
|
34149
34272
|
}
|
|
34150
|
-
return yield this.cryptoFunctionService.aesDecryptFast(
|
|
34273
|
+
return yield this.cryptoFunctionService.aesDecryptFast({ mode: "cbc", parameters: fastParams });
|
|
34151
34274
|
});
|
|
34152
34275
|
}
|
|
34153
|
-
decryptToBytes(
|
|
34154
|
-
return __awaiter(this,
|
|
34276
|
+
decryptToBytes(encThing_1, key_1) {
|
|
34277
|
+
return __awaiter(this, arguments, void 0, function* (encThing, key, decryptContext = "no context") {
|
|
34155
34278
|
if (key == null) {
|
|
34156
34279
|
throw new Error("No encryption key provided.");
|
|
34157
34280
|
}
|
|
@@ -34164,14 +34287,18 @@ class EncryptServiceImplementation {
|
|
|
34164
34287
|
this.logService.error("[Encrypt service] Key has mac key but payload is missing mac bytes. Key type " +
|
|
34165
34288
|
(0,enums/* encryptionTypeToString */.QX)(key.encType) +
|
|
34166
34289
|
" Payload type " +
|
|
34167
|
-
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType)
|
|
34290
|
+
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType) +
|
|
34291
|
+
" Decrypt context: " +
|
|
34292
|
+
decryptContext);
|
|
34168
34293
|
return null;
|
|
34169
34294
|
}
|
|
34170
34295
|
if (key.encType !== encThing.encryptionType) {
|
|
34171
34296
|
this.logService.error("[Encrypt service] Key encryption type does not match payload encryption type. Key type " +
|
|
34172
34297
|
(0,enums/* encryptionTypeToString */.QX)(key.encType) +
|
|
34173
34298
|
" Payload type " +
|
|
34174
|
-
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType)
|
|
34299
|
+
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType) +
|
|
34300
|
+
" Decrypt context: " +
|
|
34301
|
+
decryptContext);
|
|
34175
34302
|
return null;
|
|
34176
34303
|
}
|
|
34177
34304
|
if (key.macKey != null && encThing.macBytes != null) {
|
|
@@ -34180,20 +34307,24 @@ class EncryptServiceImplementation {
|
|
|
34180
34307
|
macData.set(new Uint8Array(encThing.dataBytes), encThing.ivBytes.byteLength);
|
|
34181
34308
|
const computedMac = yield this.cryptoFunctionService.hmac(macData, key.macKey, "sha256");
|
|
34182
34309
|
if (computedMac === null) {
|
|
34183
|
-
this.logMacFailed("[Encrypt service] Failed to compute MAC." +
|
|
34310
|
+
this.logMacFailed("[Encrypt service#decryptToBytes] Failed to compute MAC." +
|
|
34184
34311
|
" Key type " +
|
|
34185
34312
|
(0,enums/* encryptionTypeToString */.QX)(key.encType) +
|
|
34186
34313
|
" Payload type " +
|
|
34187
|
-
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType)
|
|
34314
|
+
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType) +
|
|
34315
|
+
" Decrypt context: " +
|
|
34316
|
+
decryptContext);
|
|
34188
34317
|
return null;
|
|
34189
34318
|
}
|
|
34190
34319
|
const macsMatch = yield this.cryptoFunctionService.compare(encThing.macBytes, computedMac);
|
|
34191
34320
|
if (!macsMatch) {
|
|
34192
|
-
this.logMacFailed("[Encrypt service] MAC comparison failed. Key or payload has changed." +
|
|
34321
|
+
this.logMacFailed("[Encrypt service#decryptToBytes]: MAC comparison failed. Key or payload has changed." +
|
|
34193
34322
|
" Key type " +
|
|
34194
34323
|
(0,enums/* encryptionTypeToString */.QX)(key.encType) +
|
|
34195
34324
|
" Payload type " +
|
|
34196
|
-
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType)
|
|
34325
|
+
(0,enums/* encryptionTypeToString */.QX)(encThing.encryptionType) +
|
|
34326
|
+
" Decrypt context: " +
|
|
34327
|
+
decryptContext);
|
|
34197
34328
|
return null;
|
|
34198
34329
|
}
|
|
34199
34330
|
}
|
|
@@ -34749,8 +34880,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
34749
34880
|
P: () => (/* binding */ FileUploadService)
|
|
34750
34881
|
});
|
|
34751
34882
|
|
|
34752
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts +
|
|
34753
|
-
var enums = __webpack_require__(
|
|
34883
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
34884
|
+
var enums = __webpack_require__(5874);
|
|
34754
34885
|
// EXTERNAL MODULE: ../../libs/common/src/platform/misc/utils.ts + 2 modules
|
|
34755
34886
|
var utils = __webpack_require__(6948);
|
|
34756
34887
|
;// ../../libs/common/src/platform/services/file-upload/azure-file-upload.service.ts
|
|
@@ -35040,7 +35171,7 @@ class FileUploadService {
|
|
|
35040
35171
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35041
35172
|
/* harmony export */ $: () => (/* binding */ KeyGenerationService)
|
|
35042
35173
|
/* harmony export */ });
|
|
35043
|
-
/* harmony import */ var _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
35174
|
+
/* harmony import */ var _bitwarden_key_management__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
|
|
35044
35175
|
/* harmony import */ var _misc_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6948);
|
|
35045
35176
|
/* harmony import */ var _models_domain_symmetric_crypto_key__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7310);
|
|
35046
35177
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
@@ -35550,8 +35681,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
35550
35681
|
|
|
35551
35682
|
// EXTERNAL MODULE: external "rxjs"
|
|
35552
35683
|
var external_rxjs_ = __webpack_require__(573);
|
|
35553
|
-
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts +
|
|
35554
|
-
var src = __webpack_require__(
|
|
35684
|
+
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts + 20 modules
|
|
35685
|
+
var src = __webpack_require__(5907);
|
|
35555
35686
|
// EXTERNAL MODULE: ../../node_modules/@bitwarden/sdk-internal/bitwarden_wasm_internal_bg.js
|
|
35556
35687
|
var bitwarden_wasm_internal_bg = __webpack_require__(6414);
|
|
35557
35688
|
// EXTERNAL MODULE: ../../libs/common/src/enums/device-type.enum.ts
|
|
@@ -35702,55 +35833,55 @@ class DefaultSdkService {
|
|
|
35702
35833
|
}
|
|
35703
35834
|
toDevice(device) {
|
|
35704
35835
|
switch (device) {
|
|
35705
|
-
case device_type_enum/* DeviceType */.
|
|
35836
|
+
case device_type_enum/* DeviceType */.b.Android:
|
|
35706
35837
|
return "Android";
|
|
35707
|
-
case device_type_enum/* DeviceType */.
|
|
35838
|
+
case device_type_enum/* DeviceType */.b.iOS:
|
|
35708
35839
|
return "iOS";
|
|
35709
|
-
case device_type_enum/* DeviceType */.
|
|
35840
|
+
case device_type_enum/* DeviceType */.b.ChromeExtension:
|
|
35710
35841
|
return "ChromeExtension";
|
|
35711
|
-
case device_type_enum/* DeviceType */.
|
|
35842
|
+
case device_type_enum/* DeviceType */.b.FirefoxExtension:
|
|
35712
35843
|
return "FirefoxExtension";
|
|
35713
|
-
case device_type_enum/* DeviceType */.
|
|
35844
|
+
case device_type_enum/* DeviceType */.b.OperaExtension:
|
|
35714
35845
|
return "OperaExtension";
|
|
35715
|
-
case device_type_enum/* DeviceType */.
|
|
35846
|
+
case device_type_enum/* DeviceType */.b.EdgeExtension:
|
|
35716
35847
|
return "EdgeExtension";
|
|
35717
|
-
case device_type_enum/* DeviceType */.
|
|
35848
|
+
case device_type_enum/* DeviceType */.b.WindowsDesktop:
|
|
35718
35849
|
return "WindowsDesktop";
|
|
35719
|
-
case device_type_enum/* DeviceType */.
|
|
35850
|
+
case device_type_enum/* DeviceType */.b.MacOsDesktop:
|
|
35720
35851
|
return "MacOsDesktop";
|
|
35721
|
-
case device_type_enum/* DeviceType */.
|
|
35852
|
+
case device_type_enum/* DeviceType */.b.LinuxDesktop:
|
|
35722
35853
|
return "LinuxDesktop";
|
|
35723
|
-
case device_type_enum/* DeviceType */.
|
|
35854
|
+
case device_type_enum/* DeviceType */.b.ChromeBrowser:
|
|
35724
35855
|
return "ChromeBrowser";
|
|
35725
|
-
case device_type_enum/* DeviceType */.
|
|
35856
|
+
case device_type_enum/* DeviceType */.b.FirefoxBrowser:
|
|
35726
35857
|
return "FirefoxBrowser";
|
|
35727
|
-
case device_type_enum/* DeviceType */.
|
|
35858
|
+
case device_type_enum/* DeviceType */.b.OperaBrowser:
|
|
35728
35859
|
return "OperaBrowser";
|
|
35729
|
-
case device_type_enum/* DeviceType */.
|
|
35860
|
+
case device_type_enum/* DeviceType */.b.EdgeBrowser:
|
|
35730
35861
|
return "EdgeBrowser";
|
|
35731
|
-
case device_type_enum/* DeviceType */.
|
|
35862
|
+
case device_type_enum/* DeviceType */.b.IEBrowser:
|
|
35732
35863
|
return "IEBrowser";
|
|
35733
|
-
case device_type_enum/* DeviceType */.
|
|
35864
|
+
case device_type_enum/* DeviceType */.b.UnknownBrowser:
|
|
35734
35865
|
return "UnknownBrowser";
|
|
35735
|
-
case device_type_enum/* DeviceType */.
|
|
35866
|
+
case device_type_enum/* DeviceType */.b.AndroidAmazon:
|
|
35736
35867
|
return "AndroidAmazon";
|
|
35737
|
-
case device_type_enum/* DeviceType */.
|
|
35868
|
+
case device_type_enum/* DeviceType */.b.UWP:
|
|
35738
35869
|
return "UWP";
|
|
35739
|
-
case device_type_enum/* DeviceType */.
|
|
35870
|
+
case device_type_enum/* DeviceType */.b.SafariBrowser:
|
|
35740
35871
|
return "SafariBrowser";
|
|
35741
|
-
case device_type_enum/* DeviceType */.
|
|
35872
|
+
case device_type_enum/* DeviceType */.b.VivaldiBrowser:
|
|
35742
35873
|
return "VivaldiBrowser";
|
|
35743
|
-
case device_type_enum/* DeviceType */.
|
|
35874
|
+
case device_type_enum/* DeviceType */.b.VivaldiExtension:
|
|
35744
35875
|
return "VivaldiExtension";
|
|
35745
|
-
case device_type_enum/* DeviceType */.
|
|
35876
|
+
case device_type_enum/* DeviceType */.b.SafariExtension:
|
|
35746
35877
|
return "SafariExtension";
|
|
35747
|
-
case device_type_enum/* DeviceType */.
|
|
35878
|
+
case device_type_enum/* DeviceType */.b.Server:
|
|
35748
35879
|
return "Server";
|
|
35749
|
-
case device_type_enum/* DeviceType */.
|
|
35880
|
+
case device_type_enum/* DeviceType */.b.WindowsCLI:
|
|
35750
35881
|
return "WindowsCLI";
|
|
35751
|
-
case device_type_enum/* DeviceType */.
|
|
35882
|
+
case device_type_enum/* DeviceType */.b.MacOsCLI:
|
|
35752
35883
|
return "MacOsCLI";
|
|
35753
|
-
case device_type_enum/* DeviceType */.
|
|
35884
|
+
case device_type_enum/* DeviceType */.b.LinuxCLI:
|
|
35754
35885
|
return "LinuxCLI";
|
|
35755
35886
|
default:
|
|
35756
35887
|
return "SDK";
|
|
@@ -35792,8 +35923,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
35792
35923
|
|
|
35793
35924
|
// EXTERNAL MODULE: external "rxjs"
|
|
35794
35925
|
var external_rxjs_ = __webpack_require__(573);
|
|
35795
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts +
|
|
35796
|
-
var enums = __webpack_require__(
|
|
35926
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
35927
|
+
var enums = __webpack_require__(5874);
|
|
35797
35928
|
// EXTERNAL MODULE: ../../libs/common/src/platform/models/domain/account.ts
|
|
35798
35929
|
var account = __webpack_require__(1656);
|
|
35799
35930
|
;// ../../libs/common/src/platform/models/domain/state.ts
|
|
@@ -36456,7 +36587,7 @@ class StorageServiceProvider {
|
|
|
36456
36587
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
36457
36588
|
/* harmony export */ T: () => (/* binding */ UserAutoUnlockKeyService)
|
|
36458
36589
|
/* harmony export */ });
|
|
36459
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
36590
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5874);
|
|
36460
36591
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36461
36592
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
36462
36593
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -37062,6 +37193,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37062
37193
|
Wm: () => (/* reexport */ state_definitions/* ENVIRONMENT_MEMORY */.Wm),
|
|
37063
37194
|
Qb: () => (/* reexport */ state_definitions/* EVENT_COLLECTION_DISK */.Qb),
|
|
37064
37195
|
Rv: () => (/* reexport */ state_definitions/* FOLDER_DISK */.Rv),
|
|
37196
|
+
jx: () => (/* reexport */ state_definitions/* FOLDER_MEMORY */.jx),
|
|
37065
37197
|
qd: () => (/* reexport */ state_definitions/* GENERATOR_DISK */.qd),
|
|
37066
37198
|
kj: () => (/* reexport */ state_definitions/* GENERATOR_MEMORY */.kj),
|
|
37067
37199
|
P7: () => (/* reexport */ state_definitions/* KDF_CONFIG_DISK */.P7),
|
|
@@ -37573,6 +37705,7 @@ class StateDefinition {
|
|
|
37573
37705
|
/* harmony export */ ie: () => (/* binding */ ACCOUNT_DISK),
|
|
37574
37706
|
/* harmony export */ jB: () => (/* binding */ LOGIN_EMAIL_MEMORY),
|
|
37575
37707
|
/* harmony export */ jb: () => (/* binding */ POLICIES_DISK),
|
|
37708
|
+
/* harmony export */ jx: () => (/* binding */ FOLDER_MEMORY),
|
|
37576
37709
|
/* harmony export */ kj: () => (/* binding */ GENERATOR_MEMORY),
|
|
37577
37710
|
/* harmony export */ nr: () => (/* binding */ ORGANIZATIONS_DISK),
|
|
37578
37711
|
/* harmony export */ oR: () => (/* binding */ TOKEN_MEMORY),
|
|
@@ -37707,6 +37840,9 @@ const COLLECTION_DATA = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .St
|
|
|
37707
37840
|
web: "memory",
|
|
37708
37841
|
});
|
|
37709
37842
|
const FOLDER_DISK = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("folder", "disk", { web: "memory" });
|
|
37843
|
+
const FOLDER_MEMORY = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("decryptedFolders", "memory", {
|
|
37844
|
+
browser: "memory-large-object",
|
|
37845
|
+
});
|
|
37710
37846
|
const VAULT_FILTER_DISK = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("vaultFilter", "disk", {
|
|
37711
37847
|
web: "disk-local",
|
|
37712
37848
|
});
|
|
@@ -37734,7 +37870,9 @@ const PREMIUM_BANNER_DISK_LOCAL = new _state_definition__WEBPACK_IMPORTED_MODULE
|
|
|
37734
37870
|
});
|
|
37735
37871
|
const BANNERS_DISMISSED_DISK = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("bannersDismissed", "disk");
|
|
37736
37872
|
const VAULT_BROWSER_UI_ONBOARDING = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("vaultBrowserUiOnboarding", "disk");
|
|
37737
|
-
const NEW_DEVICE_VERIFICATION_NOTICE = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("newDeviceVerificationNotice", "disk"
|
|
37873
|
+
const NEW_DEVICE_VERIFICATION_NOTICE = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("newDeviceVerificationNotice", "disk", {
|
|
37874
|
+
web: "disk-local",
|
|
37875
|
+
});
|
|
37738
37876
|
const VAULT_APPEARANCE = new _state_definition__WEBPACK_IMPORTED_MODULE_0__/* .StateDefinition */ .z("vaultAppearance", "disk");
|
|
37739
37877
|
|
|
37740
37878
|
|
|
@@ -37993,17 +38131,18 @@ class CoreSyncService {
|
|
|
37993
38131
|
yield this.stateProvider.getUser(userId, LAST_SYNC_DATE).update(() => date);
|
|
37994
38132
|
});
|
|
37995
38133
|
}
|
|
37996
|
-
syncUpsertFolder(notification, isEdit) {
|
|
38134
|
+
syncUpsertFolder(notification, isEdit, userId) {
|
|
37997
38135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37998
38136
|
this.syncStarted();
|
|
37999
|
-
|
|
38137
|
+
const authStatus = yield (0,external_rxjs_.firstValueFrom)(this.authService.authStatusFor$(userId));
|
|
38138
|
+
if (authStatus >= authentication_status/* AuthenticationStatus */.J.Locked) {
|
|
38000
38139
|
try {
|
|
38001
|
-
const localFolder = yield this.folderService.get(notification.id);
|
|
38140
|
+
const localFolder = yield this.folderService.get(notification.id, userId);
|
|
38002
38141
|
if ((!isEdit && localFolder == null) ||
|
|
38003
38142
|
(isEdit && localFolder != null && localFolder.revisionDate < notification.revisionDate)) {
|
|
38004
38143
|
const remoteFolder = yield this.folderApiService.get(notification.id);
|
|
38005
38144
|
if (remoteFolder != null) {
|
|
38006
|
-
yield this.folderService.upsert(new folder_data/* FolderData */.p(remoteFolder));
|
|
38145
|
+
yield this.folderService.upsert(new folder_data/* FolderData */.p(remoteFolder), userId);
|
|
38007
38146
|
this.messageSender.send("syncedUpsertedFolder", { folderId: notification.id });
|
|
38008
38147
|
return this.syncCompleted(true);
|
|
38009
38148
|
}
|
|
@@ -38016,11 +38155,12 @@ class CoreSyncService {
|
|
|
38016
38155
|
return this.syncCompleted(false);
|
|
38017
38156
|
});
|
|
38018
38157
|
}
|
|
38019
|
-
syncDeleteFolder(notification) {
|
|
38158
|
+
syncDeleteFolder(notification, userId) {
|
|
38020
38159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38021
38160
|
this.syncStarted();
|
|
38022
|
-
|
|
38023
|
-
|
|
38161
|
+
const authStatus = yield (0,external_rxjs_.firstValueFrom)(this.authService.authStatusFor$(userId));
|
|
38162
|
+
if (authStatus >= authentication_status/* AuthenticationStatus */.J.Locked) {
|
|
38163
|
+
yield this.folderService.delete(notification.id, userId);
|
|
38024
38164
|
this.messageSender.send("syncedDeletedFolder", { folderId: notification.id });
|
|
38025
38165
|
this.syncCompleted(true);
|
|
38026
38166
|
return true;
|
|
@@ -39543,7 +39683,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
39543
39683
|
|
|
39544
39684
|
|
|
39545
39685
|
class VaultTimeoutService {
|
|
39546
|
-
constructor(accountService, masterPasswordService, cipherService, folderService, collectionService, platformUtilsService, messagingService, searchService, stateService, authService, vaultTimeoutSettingsService, stateEventRunnerService, taskSchedulerService, logService, lockedCallback = null, loggedOutCallback = null) {
|
|
39686
|
+
constructor(accountService, masterPasswordService, cipherService, folderService, collectionService, platformUtilsService, messagingService, searchService, stateService, authService, vaultTimeoutSettingsService, stateEventRunnerService, taskSchedulerService, logService, biometricService, lockedCallback = null, loggedOutCallback = null) {
|
|
39547
39687
|
this.accountService = accountService;
|
|
39548
39688
|
this.masterPasswordService = masterPasswordService;
|
|
39549
39689
|
this.cipherService = cipherService;
|
|
@@ -39558,6 +39698,7 @@ class VaultTimeoutService {
|
|
|
39558
39698
|
this.stateEventRunnerService = stateEventRunnerService;
|
|
39559
39699
|
this.taskSchedulerService = taskSchedulerService;
|
|
39560
39700
|
this.logService = logService;
|
|
39701
|
+
this.biometricService = biometricService;
|
|
39561
39702
|
this.lockedCallback = lockedCallback;
|
|
39562
39703
|
this.loggedOutCallback = loggedOutCallback;
|
|
39563
39704
|
this.inited = false;
|
|
@@ -39599,6 +39740,7 @@ class VaultTimeoutService {
|
|
|
39599
39740
|
}
|
|
39600
39741
|
lock(userId) {
|
|
39601
39742
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39743
|
+
yield this.biometricService.setShouldAutopromptNow(false);
|
|
39602
39744
|
const authed = yield this.stateService.getIsAuthenticated({ userId: userId });
|
|
39603
39745
|
if (!authed) {
|
|
39604
39746
|
return;
|
|
@@ -39622,9 +39764,9 @@ class VaultTimeoutService {
|
|
|
39622
39764
|
})));
|
|
39623
39765
|
if (userId == null || userId === currentUserId) {
|
|
39624
39766
|
yield this.searchService.clearIndex();
|
|
39625
|
-
yield this.folderService.clearCache();
|
|
39626
39767
|
yield this.collectionService.clearActiveUserCache();
|
|
39627
39768
|
}
|
|
39769
|
+
yield this.folderService.clearDecryptedFolderState(lockingUserId);
|
|
39628
39770
|
yield this.masterPasswordService.clearMasterKey(lockingUserId);
|
|
39629
39771
|
yield this.stateService.setUserKeyAutoUnlock(null, { userId: lockingUserId });
|
|
39630
39772
|
yield this.stateService.setCryptoMasterKeyAuto(null, { userId: lockingUserId });
|
|
@@ -46032,8 +46174,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
46032
46174
|
|
|
46033
46175
|
// EXTERNAL MODULE: external "rxjs"
|
|
46034
46176
|
var external_rxjs_ = __webpack_require__(573);
|
|
46035
|
-
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts +
|
|
46036
|
-
var src = __webpack_require__(
|
|
46177
|
+
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts + 20 modules
|
|
46178
|
+
var src = __webpack_require__(5907);
|
|
46037
46179
|
// EXTERNAL MODULE: ../../libs/common/src/platform/misc/utils.ts + 2 modules
|
|
46038
46180
|
var utils = __webpack_require__(6948);
|
|
46039
46181
|
// EXTERNAL MODULE: ../../libs/common/src/tools/send/enums/send-type.ts
|
|
@@ -47663,11 +47805,11 @@ class Attachment extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_M
|
|
|
47663
47805
|
key: null,
|
|
47664
47806
|
}, ["id", "url", "sizeName"]);
|
|
47665
47807
|
}
|
|
47666
|
-
decrypt(
|
|
47667
|
-
return __awaiter(this,
|
|
47808
|
+
decrypt(orgId_1) {
|
|
47809
|
+
return __awaiter(this, arguments, void 0, function* (orgId, context = "No Cipher Context", encKey) {
|
|
47668
47810
|
const view = yield this.decryptObj(new _view_attachment_view__WEBPACK_IMPORTED_MODULE_4__/* .AttachmentView */ .$(this), {
|
|
47669
47811
|
fileName: null,
|
|
47670
|
-
}, orgId, encKey);
|
|
47812
|
+
}, orgId, encKey, "DomainType: Attachment; " + context);
|
|
47671
47813
|
if (this.key != null) {
|
|
47672
47814
|
view.key = yield this.decryptAttachmentKey(orgId, encKey);
|
|
47673
47815
|
}
|
|
@@ -47735,6 +47877,15 @@ class Attachment extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_M
|
|
|
47735
47877
|
/* harmony import */ var _platform_models_domain_enc_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6505);
|
|
47736
47878
|
/* harmony import */ var _data_card_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3644);
|
|
47737
47879
|
/* harmony import */ var _view_card_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2780);
|
|
47880
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
47881
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
47882
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
47883
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
47884
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
47885
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47886
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47887
|
+
});
|
|
47888
|
+
};
|
|
47738
47889
|
|
|
47739
47890
|
|
|
47740
47891
|
|
|
@@ -47754,15 +47905,17 @@ class Card extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODULE_
|
|
|
47754
47905
|
code: null,
|
|
47755
47906
|
}, []);
|
|
47756
47907
|
}
|
|
47757
|
-
decrypt(
|
|
47758
|
-
return this
|
|
47759
|
-
|
|
47760
|
-
|
|
47761
|
-
|
|
47762
|
-
|
|
47763
|
-
|
|
47764
|
-
|
|
47765
|
-
|
|
47908
|
+
decrypt(orgId_1) {
|
|
47909
|
+
return __awaiter(this, arguments, void 0, function* (orgId, context = "No Cipher Context", encKey) {
|
|
47910
|
+
return this.decryptObj(new _view_card_view__WEBPACK_IMPORTED_MODULE_2__/* .CardView */ .G(), {
|
|
47911
|
+
cardholderName: null,
|
|
47912
|
+
brand: null,
|
|
47913
|
+
number: null,
|
|
47914
|
+
expMonth: null,
|
|
47915
|
+
expYear: null,
|
|
47916
|
+
code: null,
|
|
47917
|
+
}, orgId, encKey, "DomainType: Card; " + context);
|
|
47918
|
+
});
|
|
47766
47919
|
}
|
|
47767
47920
|
toCardData() {
|
|
47768
47921
|
const c = new _data_card_data__WEBPACK_IMPORTED_MODULE_3__/* .CardData */ .b();
|
|
@@ -47925,7 +48078,13 @@ class Cipher extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODUL
|
|
|
47925
48078
|
let bypassValidation = true;
|
|
47926
48079
|
if (this.key != null) {
|
|
47927
48080
|
const encryptService = _platform_misc_utils__WEBPACK_IMPORTED_MODULE_0__/* .Utils */ .A.getContainerService().getEncryptService();
|
|
47928
|
-
|
|
48081
|
+
const keyBytes = yield encryptService.decryptToBytes(this.key, encKey, `Cipher Id: ${this.id}; Content: CipherKey; IsEncryptedByOrgKey: ${this.organizationId != null}`);
|
|
48082
|
+
if (keyBytes == null) {
|
|
48083
|
+
model.name = "[error: cannot decrypt]";
|
|
48084
|
+
model.decryptionFailure = true;
|
|
48085
|
+
return model;
|
|
48086
|
+
}
|
|
48087
|
+
encKey = new _platform_models_domain_symmetric_crypto_key__WEBPACK_IMPORTED_MODULE_3__/* .SymmetricCryptoKey */ .e(keyBytes);
|
|
47929
48088
|
bypassValidation = false;
|
|
47930
48089
|
}
|
|
47931
48090
|
yield this.decryptObj(model, {
|
|
@@ -47934,19 +48093,19 @@ class Cipher extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODUL
|
|
|
47934
48093
|
}, this.organizationId, encKey);
|
|
47935
48094
|
switch (this.type) {
|
|
47936
48095
|
case _enums_cipher_type__WEBPACK_IMPORTED_MODULE_5__/* .CipherType */ .g.Login:
|
|
47937
|
-
model.login = yield this.login.decrypt(this.organizationId, bypassValidation, encKey);
|
|
48096
|
+
model.login = yield this.login.decrypt(this.organizationId, bypassValidation, `Cipher Id: ${this.id}`, encKey);
|
|
47938
48097
|
break;
|
|
47939
48098
|
case _enums_cipher_type__WEBPACK_IMPORTED_MODULE_5__/* .CipherType */ .g.SecureNote:
|
|
47940
|
-
model.secureNote = yield this.secureNote.decrypt(this.organizationId, encKey);
|
|
48099
|
+
model.secureNote = yield this.secureNote.decrypt(this.organizationId, `Cipher Id: ${this.id}`, encKey);
|
|
47941
48100
|
break;
|
|
47942
48101
|
case _enums_cipher_type__WEBPACK_IMPORTED_MODULE_5__/* .CipherType */ .g.Card:
|
|
47943
|
-
model.card = yield this.card.decrypt(this.organizationId, encKey);
|
|
48102
|
+
model.card = yield this.card.decrypt(this.organizationId, `Cipher Id: ${this.id}`, encKey);
|
|
47944
48103
|
break;
|
|
47945
48104
|
case _enums_cipher_type__WEBPACK_IMPORTED_MODULE_5__/* .CipherType */ .g.Identity:
|
|
47946
|
-
model.identity = yield this.identity.decrypt(this.organizationId, encKey);
|
|
48105
|
+
model.identity = yield this.identity.decrypt(this.organizationId, `Cipher Id: ${this.id}`, encKey);
|
|
47947
48106
|
break;
|
|
47948
48107
|
case _enums_cipher_type__WEBPACK_IMPORTED_MODULE_5__/* .CipherType */ .g.SshKey:
|
|
47949
|
-
model.sshKey = yield this.sshKey.decrypt(this.organizationId, encKey);
|
|
48108
|
+
model.sshKey = yield this.sshKey.decrypt(this.organizationId, `Cipher Id: ${this.id}`, encKey);
|
|
47950
48109
|
break;
|
|
47951
48110
|
default:
|
|
47952
48111
|
break;
|
|
@@ -47956,7 +48115,7 @@ class Cipher extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODUL
|
|
|
47956
48115
|
yield this.attachments.reduce((promise, attachment) => {
|
|
47957
48116
|
return promise
|
|
47958
48117
|
.then(() => {
|
|
47959
|
-
return attachment.decrypt(this.organizationId, encKey);
|
|
48118
|
+
return attachment.decrypt(this.organizationId, `Cipher Id: ${this.id}`, encKey);
|
|
47960
48119
|
})
|
|
47961
48120
|
.then((decAttachment) => {
|
|
47962
48121
|
attachments.push(decAttachment);
|
|
@@ -48383,7 +48542,7 @@ class Identity extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MOD
|
|
|
48383
48542
|
licenseNumber: null,
|
|
48384
48543
|
}, []);
|
|
48385
48544
|
}
|
|
48386
|
-
decrypt(orgId, encKey) {
|
|
48545
|
+
decrypt(orgId, context = "No Cipher Context", encKey) {
|
|
48387
48546
|
return this.decryptObj(new _view_identity_view__WEBPACK_IMPORTED_MODULE_2__/* .IdentityView */ .O(), {
|
|
48388
48547
|
title: null,
|
|
48389
48548
|
firstName: null,
|
|
@@ -48403,7 +48562,7 @@ class Identity extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MOD
|
|
|
48403
48562
|
username: null,
|
|
48404
48563
|
passportNumber: null,
|
|
48405
48564
|
licenseNumber: null,
|
|
48406
|
-
}, orgId, encKey);
|
|
48565
|
+
}, orgId, encKey, "DomainType: Identity; " + context);
|
|
48407
48566
|
}
|
|
48408
48567
|
toIdentityData() {
|
|
48409
48568
|
const i = new _data_identity_data__WEBPACK_IMPORTED_MODULE_3__/* .IdentityData */ .j();
|
|
@@ -48514,10 +48673,10 @@ class LoginUri extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MOD
|
|
|
48514
48673
|
uriChecksum: null,
|
|
48515
48674
|
}, []);
|
|
48516
48675
|
}
|
|
48517
|
-
decrypt(orgId, encKey) {
|
|
48676
|
+
decrypt(orgId, context = "No Cipher Context", encKey) {
|
|
48518
48677
|
return this.decryptObj(new _view_login_uri_view__WEBPACK_IMPORTED_MODULE_3__/* .LoginUriView */ .z(this), {
|
|
48519
48678
|
uri: null,
|
|
48520
|
-
}, orgId, encKey);
|
|
48679
|
+
}, orgId, encKey, context);
|
|
48521
48680
|
}
|
|
48522
48681
|
validateChecksum(clearTextUri, orgId, encKey) {
|
|
48523
48682
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -48606,13 +48765,13 @@ class Login extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODULE
|
|
|
48606
48765
|
this.fido2Credentials = obj.fido2Credentials.map((key) => new _fido2_credential__WEBPACK_IMPORTED_MODULE_3__/* .Fido2Credential */ .U(key));
|
|
48607
48766
|
}
|
|
48608
48767
|
}
|
|
48609
|
-
decrypt(
|
|
48610
|
-
return __awaiter(this,
|
|
48768
|
+
decrypt(orgId_1, bypassValidation_1) {
|
|
48769
|
+
return __awaiter(this, arguments, void 0, function* (orgId, bypassValidation, context = "No Cipher Context", encKey) {
|
|
48611
48770
|
const view = yield this.decryptObj(new _view_login_view__WEBPACK_IMPORTED_MODULE_2__/* .LoginView */ .r(this), {
|
|
48612
48771
|
username: null,
|
|
48613
48772
|
password: null,
|
|
48614
48773
|
totp: null,
|
|
48615
|
-
}, orgId, encKey);
|
|
48774
|
+
}, orgId, encKey, `DomainType: Login; ${context}`);
|
|
48616
48775
|
if (this.uris != null) {
|
|
48617
48776
|
view.uris = [];
|
|
48618
48777
|
for (let i = 0; i < this.uris.length; i++) {
|
|
@@ -48620,7 +48779,7 @@ class Login extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODULE
|
|
|
48620
48779
|
if (this.uris[i].uri == null) {
|
|
48621
48780
|
continue;
|
|
48622
48781
|
}
|
|
48623
|
-
const uri = yield this.uris[i].decrypt(orgId, encKey);
|
|
48782
|
+
const uri = yield this.uris[i].decrypt(orgId, context, encKey);
|
|
48624
48783
|
// URIs are shared remotely after decryption
|
|
48625
48784
|
// we need to validate that the string hasn't been changed by a compromised server
|
|
48626
48785
|
// This validation is tied to the existence of cypher.key for backwards compatibility
|
|
@@ -48711,7 +48870,7 @@ class Password extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MOD
|
|
|
48711
48870
|
decrypt(orgId, encKey) {
|
|
48712
48871
|
return this.decryptObj(new _view_password_history_view__WEBPACK_IMPORTED_MODULE_2__/* .PasswordHistoryView */ .j(this), {
|
|
48713
48872
|
password: null,
|
|
48714
|
-
}, orgId, encKey);
|
|
48873
|
+
}, orgId, encKey, "DomainType: PasswordHistory");
|
|
48715
48874
|
}
|
|
48716
48875
|
toPasswordHistoryData() {
|
|
48717
48876
|
const ph = new _data_password_history_data__WEBPACK_IMPORTED_MODULE_3__/* .PasswordHistoryData */ .k();
|
|
@@ -48746,6 +48905,15 @@ class Password extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MOD
|
|
|
48746
48905
|
/* harmony import */ var _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(673);
|
|
48747
48906
|
/* harmony import */ var _data_secure_note_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8188);
|
|
48748
48907
|
/* harmony import */ var _view_secure_note_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2742);
|
|
48908
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
48909
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
48910
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
48911
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
48912
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
48913
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
48914
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48915
|
+
});
|
|
48916
|
+
};
|
|
48749
48917
|
|
|
48750
48918
|
|
|
48751
48919
|
|
|
@@ -48757,8 +48925,10 @@ class SecureNote extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_M
|
|
|
48757
48925
|
}
|
|
48758
48926
|
this.type = obj.type;
|
|
48759
48927
|
}
|
|
48760
|
-
decrypt(
|
|
48761
|
-
return
|
|
48928
|
+
decrypt(orgId_1) {
|
|
48929
|
+
return __awaiter(this, arguments, void 0, function* (orgId, context = "No Cipher Context", encKey) {
|
|
48930
|
+
return new _view_secure_note_view__WEBPACK_IMPORTED_MODULE_1__/* .SecureNoteView */ .Z(this);
|
|
48931
|
+
});
|
|
48762
48932
|
}
|
|
48763
48933
|
toSecureNoteData() {
|
|
48764
48934
|
const n = new _data_secure_note_data__WEBPACK_IMPORTED_MODULE_2__/* .SecureNoteData */ .e();
|
|
@@ -48802,12 +48972,12 @@ class SshKey extends _platform_models_domain_domain_base__WEBPACK_IMPORTED_MODUL
|
|
|
48802
48972
|
keyFingerprint: null,
|
|
48803
48973
|
}, []);
|
|
48804
48974
|
}
|
|
48805
|
-
decrypt(orgId, encKey) {
|
|
48975
|
+
decrypt(orgId, context = "No Cipher Context", encKey) {
|
|
48806
48976
|
return this.decryptObj(new _view_ssh_key_view__WEBPACK_IMPORTED_MODULE_2__/* .SshKeyView */ .H(), {
|
|
48807
48977
|
privateKey: null,
|
|
48808
48978
|
publicKey: null,
|
|
48809
48979
|
keyFingerprint: null,
|
|
48810
|
-
}, orgId, encKey);
|
|
48980
|
+
}, orgId, encKey, "DomainType: SshKey; " + context);
|
|
48811
48981
|
}
|
|
48812
48982
|
toSshKeyData() {
|
|
48813
48983
|
const c = new _data_ssh_key_data__WEBPACK_IMPORTED_MODULE_3__/* .SshKeyData */ .E();
|
|
@@ -49362,6 +49532,10 @@ class CipherView {
|
|
|
49362
49532
|
this.creationDate = null;
|
|
49363
49533
|
this.deletedDate = null;
|
|
49364
49534
|
this.reprompt = _enums_cipher_reprompt_type__WEBPACK_IMPORTED_MODULE_2__/* .CipherRepromptType */ .b.None;
|
|
49535
|
+
/**
|
|
49536
|
+
* Flag to indicate if the cipher decryption failed.
|
|
49537
|
+
*/
|
|
49538
|
+
this.decryptionFailure = false;
|
|
49365
49539
|
if (!c) {
|
|
49366
49540
|
return;
|
|
49367
49541
|
}
|
|
@@ -50532,6 +50706,10 @@ const DECRYPTED_CIPHERS = state/* UserKeyDefinition */.Ok.record(state/* CIPHERS
|
|
|
50532
50706
|
deserializer: (cipher) => cipher_view/* CipherView */.f.fromJSON(cipher),
|
|
50533
50707
|
clearOn: ["logout", "lock"],
|
|
50534
50708
|
});
|
|
50709
|
+
const FAILED_DECRYPTED_CIPHERS = state/* UserKeyDefinition */.Ok.array(state/* CIPHERS_MEMORY */.Xk, "failedDecryptedCiphers", {
|
|
50710
|
+
deserializer: (cipher) => cipher_view/* CipherView */.f.fromJSON(cipher),
|
|
50711
|
+
clearOn: ["logout", "lock"],
|
|
50712
|
+
});
|
|
50535
50713
|
const LOCAL_DATA_KEY = new state/* UserKeyDefinition */.Ok(state/* CIPHERS_DISK_LOCAL */.HR, "localData", {
|
|
50536
50714
|
deserializer: (localData) => localData,
|
|
50537
50715
|
clearOn: ["logout"],
|
|
@@ -50631,12 +50809,14 @@ class CipherService {
|
|
|
50631
50809
|
this.localDataState = this.stateProvider.getActive(LOCAL_DATA_KEY);
|
|
50632
50810
|
this.encryptedCiphersState = this.stateProvider.getActive(ENCRYPTED_CIPHERS);
|
|
50633
50811
|
this.decryptedCiphersState = this.stateProvider.getActive(DECRYPTED_CIPHERS);
|
|
50812
|
+
this.failedToDecryptCiphersState = this.stateProvider.getActive(FAILED_DECRYPTED_CIPHERS);
|
|
50634
50813
|
this.addEditCipherInfoState = this.stateProvider.getActive(ADD_EDIT_CIPHER_INFO_KEY);
|
|
50635
50814
|
this.localData$ = this.localDataState.state$.pipe((0,external_rxjs_.map)((data) => data !== null && data !== void 0 ? data : {}));
|
|
50636
50815
|
this.ciphers$ = this.encryptedCiphersState.state$.pipe((0,external_rxjs_.map)((ciphers) => ciphers !== null && ciphers !== void 0 ? ciphers : {}));
|
|
50637
50816
|
// Decrypted ciphers depend on both ciphers and local data and need to be updated when either changes
|
|
50638
50817
|
this.cipherViews$ = (0,external_rxjs_.combineLatest)([this.encryptedCiphersState.state$, this.localData$]).pipe((0,external_rxjs_.filter)(([ciphers]) => ciphers != null), // Skip if ciphers haven't been loaded yor synced yet
|
|
50639
50818
|
(0,external_rxjs_.switchMap)(() => (0,external_rxjs_.merge)(this.forceCipherViews$, this.getAllDecrypted())), (0,external_rxjs_.shareReplay)({ bufferSize: 1, refCount: true }));
|
|
50819
|
+
this.failedToDecryptCiphers$ = this.failedToDecryptCiphersState.state$.pipe((0,external_rxjs_.filter)((ciphers) => ciphers != null), (0,external_rxjs_.switchMap)((ciphers) => (0,external_rxjs_.merge)(this.forceCipherViews$, (0,external_rxjs_.of)(ciphers))), (0,external_rxjs_.shareReplay)({ bufferSize: 1, refCount: true }));
|
|
50640
50820
|
this.addEditCipherInfo$ = this.addEditCipherInfoState.state$;
|
|
50641
50821
|
}
|
|
50642
50822
|
setDecryptedCipherCache(value, userId) {
|
|
@@ -50657,6 +50837,11 @@ class CipherService {
|
|
|
50657
50837
|
}
|
|
50658
50838
|
});
|
|
50659
50839
|
}
|
|
50840
|
+
setFailedDecryptedCiphers(cipherViews, userId) {
|
|
50841
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50842
|
+
yield this.stateProvider.setUserState(FAILED_DECRYPTED_CIPHERS, cipherViews, userId);
|
|
50843
|
+
});
|
|
50844
|
+
}
|
|
50660
50845
|
setDecryptedCiphers(value, userId) {
|
|
50661
50846
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50662
50847
|
const cipherViews = {};
|
|
@@ -50835,7 +51020,7 @@ class CipherService {
|
|
|
50835
51020
|
*/
|
|
50836
51021
|
getAllDecrypted() {
|
|
50837
51022
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50838
|
-
|
|
51023
|
+
const decCiphers = yield this.getDecryptedCiphers();
|
|
50839
51024
|
if (decCiphers != null && decCiphers.length !== 0) {
|
|
50840
51025
|
yield this.reindexCiphers();
|
|
50841
51026
|
return yield this.getDecryptedCiphers();
|
|
@@ -50844,9 +51029,10 @@ class CipherService {
|
|
|
50844
51029
|
if (activeUserId == null) {
|
|
50845
51030
|
return [];
|
|
50846
51031
|
}
|
|
50847
|
-
|
|
50848
|
-
yield this.setDecryptedCipherCache(
|
|
50849
|
-
|
|
51032
|
+
const [newDecCiphers, failedCiphers] = yield this.decryptCiphers(yield this.getAll(), activeUserId);
|
|
51033
|
+
yield this.setDecryptedCipherCache(newDecCiphers, activeUserId);
|
|
51034
|
+
yield this.setFailedDecryptedCiphers(failedCiphers, activeUserId);
|
|
51035
|
+
return newDecCiphers;
|
|
50850
51036
|
});
|
|
50851
51037
|
}
|
|
50852
51038
|
getDecryptedCiphers() {
|
|
@@ -50854,6 +51040,13 @@ class CipherService {
|
|
|
50854
51040
|
return Object.values(yield (0,external_rxjs_.firstValueFrom)(this.decryptedCiphersState.state$.pipe((0,external_rxjs_.map)((c) => c !== null && c !== void 0 ? c : {}))));
|
|
50855
51041
|
});
|
|
50856
51042
|
}
|
|
51043
|
+
/**
|
|
51044
|
+
* Decrypts the provided ciphers using the provided user's keys.
|
|
51045
|
+
* @param ciphers
|
|
51046
|
+
* @param userId
|
|
51047
|
+
* @returns Two cipher arrays, the first containing successfully decrypted ciphers and the second containing ciphers that failed to decrypt.
|
|
51048
|
+
* @private
|
|
51049
|
+
*/
|
|
50857
51050
|
decryptCiphers(ciphers, userId) {
|
|
50858
51051
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50859
51052
|
const keys = yield (0,external_rxjs_.firstValueFrom)(this.keyService.cipherDecryptionKeys$(userId, true));
|
|
@@ -50869,7 +51062,7 @@ class CipherService {
|
|
|
50869
51062
|
agg[c.organizationId].push(c);
|
|
50870
51063
|
return agg;
|
|
50871
51064
|
}, {});
|
|
50872
|
-
const
|
|
51065
|
+
const allCipherViews = (yield Promise.all(Object.entries(grouped).map((_a) => __awaiter(this, [_a], void 0, function* ([orgId, groupedCiphers]) {
|
|
50873
51066
|
var _b, _c;
|
|
50874
51067
|
if (yield this.configService.getFeatureFlag(feature_flag_enum/* FeatureFlag */.T.PM4154_BulkEncryptionService)) {
|
|
50875
51068
|
return yield this.bulkEncryptService.decryptItems(groupedCiphers, (_b = keys.orgKeys[orgId]) !== null && _b !== void 0 ? _b : keys.userKey);
|
|
@@ -50880,7 +51073,16 @@ class CipherService {
|
|
|
50880
51073
|
}))))
|
|
50881
51074
|
.flat()
|
|
50882
51075
|
.sort(this.getLocaleSortingFunction());
|
|
50883
|
-
|
|
51076
|
+
// Split ciphers into two arrays, one for successfully decrypted ciphers and one for ciphers that failed to decrypt
|
|
51077
|
+
return allCipherViews.reduce((acc, c) => {
|
|
51078
|
+
if (c.decryptionFailure) {
|
|
51079
|
+
acc[1].push(c);
|
|
51080
|
+
}
|
|
51081
|
+
else {
|
|
51082
|
+
acc[0].push(c);
|
|
51083
|
+
}
|
|
51084
|
+
return acc;
|
|
51085
|
+
}, [[], []]);
|
|
50884
51086
|
});
|
|
50885
51087
|
}
|
|
50886
51088
|
reindexCiphers() {
|
|
@@ -51611,9 +51813,13 @@ class CipherService {
|
|
|
51611
51813
|
}
|
|
51612
51814
|
let encryptedCiphers = [];
|
|
51613
51815
|
const ciphers = yield (0,external_rxjs_.firstValueFrom)(this.cipherViews$);
|
|
51816
|
+
const failedCiphers = yield (0,external_rxjs_.firstValueFrom)(this.failedToDecryptCiphers$);
|
|
51614
51817
|
if (!ciphers) {
|
|
51615
51818
|
return encryptedCiphers;
|
|
51616
51819
|
}
|
|
51820
|
+
if (failedCiphers.length > 0) {
|
|
51821
|
+
throw new Error("Cannot rotate ciphers when decryption failures are present");
|
|
51822
|
+
}
|
|
51617
51823
|
const userCiphers = ciphers.filter((c) => c.organizationId == null);
|
|
51618
51824
|
if (userCiphers.length === 0) {
|
|
51619
51825
|
return encryptedCiphers;
|
|
@@ -51892,6 +52098,7 @@ class CipherService {
|
|
|
51892
52098
|
clearDecryptedCiphersState(userId) {
|
|
51893
52099
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51894
52100
|
yield this.setDecryptedCiphers(null, userId);
|
|
52101
|
+
yield this.setFailedDecryptedCiphers(null, userId);
|
|
51895
52102
|
this.clearSortedCiphers();
|
|
51896
52103
|
});
|
|
51897
52104
|
}
|
|
@@ -52114,7 +52321,7 @@ class FolderApiService {
|
|
|
52114
52321
|
this.folderService = folderService;
|
|
52115
52322
|
this.apiService = apiService;
|
|
52116
52323
|
}
|
|
52117
|
-
save(folder) {
|
|
52324
|
+
save(folder, userId) {
|
|
52118
52325
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52119
52326
|
const request = new _vault_models_request_folder_request__WEBPACK_IMPORTED_MODULE_1__/* .FolderRequest */ .O(folder);
|
|
52120
52327
|
let response;
|
|
@@ -52126,19 +52333,19 @@ class FolderApiService {
|
|
|
52126
52333
|
response = yield this.putFolder(folder.id, request);
|
|
52127
52334
|
}
|
|
52128
52335
|
const data = new _vault_models_data_folder_data__WEBPACK_IMPORTED_MODULE_2__/* .FolderData */ .p(response);
|
|
52129
|
-
yield this.folderService.upsert(data);
|
|
52336
|
+
yield this.folderService.upsert(data, userId);
|
|
52130
52337
|
});
|
|
52131
52338
|
}
|
|
52132
|
-
delete(id) {
|
|
52339
|
+
delete(id, userId) {
|
|
52133
52340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52134
52341
|
yield this.deleteFolder(id);
|
|
52135
|
-
yield this.folderService.delete(id);
|
|
52342
|
+
yield this.folderService.delete(id, userId);
|
|
52136
52343
|
});
|
|
52137
52344
|
}
|
|
52138
|
-
deleteAll() {
|
|
52345
|
+
deleteAll(userId) {
|
|
52139
52346
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52140
52347
|
yield this.apiService.send("DELETE", "/folders/all", null, true, false);
|
|
52141
|
-
yield this.folderService.clear();
|
|
52348
|
+
yield this.folderService.clear(userId);
|
|
52142
52349
|
});
|
|
52143
52350
|
}
|
|
52144
52351
|
get(id) {
|
|
@@ -52191,38 +52398,20 @@ var folder_with_id_request = __webpack_require__(973);
|
|
|
52191
52398
|
// EXTERNAL MODULE: ../../libs/common/src/platform/state/index.ts + 3 modules
|
|
52192
52399
|
var state = __webpack_require__(1068);
|
|
52193
52400
|
;// ../../libs/common/src/vault/services/key-state/folder.state.ts
|
|
52194
|
-
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
52195
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
52196
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
52197
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
52198
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
52199
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
52200
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
52201
|
-
});
|
|
52202
|
-
};
|
|
52203
|
-
|
|
52204
52401
|
|
|
52205
52402
|
|
|
52206
52403
|
|
|
52207
|
-
const FOLDER_ENCRYPTED_FOLDERS = state/* UserKeyDefinition */.Ok.record(state/* FOLDER_DISK */.Rv, "
|
|
52404
|
+
const FOLDER_ENCRYPTED_FOLDERS = state/* UserKeyDefinition */.Ok.record(state/* FOLDER_DISK */.Rv, "folder", {
|
|
52208
52405
|
deserializer: (obj) => folder_data/* FolderData */.p.fromJSON(obj),
|
|
52209
52406
|
clearOn: ["logout"],
|
|
52210
52407
|
});
|
|
52211
|
-
const FOLDER_DECRYPTED_FOLDERS = state/*
|
|
52212
|
-
deserializer: (obj) => obj.map((f) => folder_view/* FolderView */.u.fromJSON(f)),
|
|
52213
|
-
|
|
52214
|
-
const folders = Object.values(from || {}).map((f) => new domain_folder/* Folder */.v(f));
|
|
52215
|
-
if (yield keyService.hasUserKey()) {
|
|
52216
|
-
return yield folderService.decryptFolders(folders);
|
|
52217
|
-
}
|
|
52218
|
-
else {
|
|
52219
|
-
return [];
|
|
52220
|
-
}
|
|
52221
|
-
}),
|
|
52408
|
+
const FOLDER_DECRYPTED_FOLDERS = new state/* UserKeyDefinition */.Ok(state/* FOLDER_MEMORY */.jx, "decryptedFolders", {
|
|
52409
|
+
deserializer: (obj) => { var _a; return (_a = obj === null || obj === void 0 ? void 0 : obj.map((f) => folder_view/* FolderView */.u.fromJSON(f))) !== null && _a !== void 0 ? _a : []; },
|
|
52410
|
+
clearOn: ["logout", "lock"],
|
|
52222
52411
|
});
|
|
52223
52412
|
|
|
52224
52413
|
;// ../../libs/common/src/vault/services/folder/folder.service.ts
|
|
52225
|
-
var
|
|
52414
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
52226
52415
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
52227
52416
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
52228
52417
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -52247,46 +52436,73 @@ class FolderService {
|
|
|
52247
52436
|
this.i18nService = i18nService;
|
|
52248
52437
|
this.cipherService = cipherService;
|
|
52249
52438
|
this.stateProvider = stateProvider;
|
|
52250
|
-
|
|
52251
|
-
|
|
52252
|
-
|
|
52253
|
-
|
|
52439
|
+
/**
|
|
52440
|
+
* Ensures we reuse the same observable stream for each userId rather than
|
|
52441
|
+
* creating a new one on each folderViews$ call.
|
|
52442
|
+
*/
|
|
52443
|
+
this.folderViewCache = new Map();
|
|
52444
|
+
/**
|
|
52445
|
+
* Used to force the folderviews$ Observable to re-emit with a provided value.
|
|
52446
|
+
* Required because shareReplay with refCount: false maintains last emission.
|
|
52447
|
+
* Used during cleanup to force emit empty arrays, ensuring stale data isn't retained.
|
|
52448
|
+
*/
|
|
52449
|
+
this.forceFolderViews = {};
|
|
52254
52450
|
}
|
|
52255
|
-
|
|
52256
|
-
return
|
|
52257
|
-
|
|
52258
|
-
|
|
52451
|
+
folders$(userId) {
|
|
52452
|
+
return this.encryptedFoldersState(userId).state$.pipe((0,external_rxjs_.map)((folders) => {
|
|
52453
|
+
if (folders == null) {
|
|
52454
|
+
return [];
|
|
52455
|
+
}
|
|
52456
|
+
return Object.values(folders).map((f) => new domain_folder/* Folder */.v(f));
|
|
52457
|
+
}));
|
|
52458
|
+
}
|
|
52459
|
+
/**
|
|
52460
|
+
* Returns an Observable of decrypted folder views for the given userId.
|
|
52461
|
+
* Uses folderViewCache to maintain a single Observable instance per user,
|
|
52462
|
+
* combining normal folder state updates with forced updates.
|
|
52463
|
+
*/
|
|
52464
|
+
folderViews$(userId) {
|
|
52465
|
+
if (!this.folderViewCache.has(userId)) {
|
|
52466
|
+
if (!this.forceFolderViews[userId]) {
|
|
52467
|
+
this.forceFolderViews[userId] = new external_rxjs_.Subject();
|
|
52468
|
+
}
|
|
52469
|
+
const observable = (0,external_rxjs_.merge)(this.forceFolderViews[userId], this.encryptedFoldersState(userId).state$.pipe((0,external_rxjs_.switchMap)((folderData) => {
|
|
52470
|
+
return this.decryptFolders(userId, folderData);
|
|
52471
|
+
}))).pipe((0,external_rxjs_.shareReplay)({ refCount: false, bufferSize: 1 }));
|
|
52472
|
+
this.folderViewCache.set(userId, observable);
|
|
52473
|
+
}
|
|
52474
|
+
return this.folderViewCache.get(userId);
|
|
52259
52475
|
}
|
|
52260
52476
|
// TODO: This should be moved to EncryptService or something
|
|
52261
52477
|
encrypt(model, key) {
|
|
52262
|
-
return
|
|
52478
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52263
52479
|
const folder = new domain_folder/* Folder */.v();
|
|
52264
52480
|
folder.id = model.id;
|
|
52265
52481
|
folder.name = yield this.encryptService.encrypt(model.name, key);
|
|
52266
52482
|
return folder;
|
|
52267
52483
|
});
|
|
52268
52484
|
}
|
|
52269
|
-
get(id) {
|
|
52270
|
-
return
|
|
52271
|
-
const folders = yield (0,external_rxjs_.firstValueFrom)(this.folders$);
|
|
52485
|
+
get(id, userId) {
|
|
52486
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52487
|
+
const folders = yield (0,external_rxjs_.firstValueFrom)(this.folders$(userId));
|
|
52272
52488
|
return folders.find((folder) => folder.id === id);
|
|
52273
52489
|
});
|
|
52274
52490
|
}
|
|
52275
|
-
getDecrypted$(id) {
|
|
52276
|
-
return this.folderViews
|
|
52491
|
+
getDecrypted$(id, userId) {
|
|
52492
|
+
return this.folderViews$(userId).pipe((0,external_rxjs_.map)((folders) => folders.find((folder) => folder.id === id)), (0,external_rxjs_.shareReplay)({ refCount: true, bufferSize: 1 }));
|
|
52277
52493
|
}
|
|
52278
|
-
getAllFromState() {
|
|
52279
|
-
return
|
|
52280
|
-
return yield (0,external_rxjs_.firstValueFrom)(this.folders$);
|
|
52494
|
+
getAllFromState(userId) {
|
|
52495
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52496
|
+
return yield (0,external_rxjs_.firstValueFrom)(this.folders$(userId));
|
|
52281
52497
|
});
|
|
52282
52498
|
}
|
|
52283
52499
|
/**
|
|
52284
52500
|
* @deprecated For the CLI only
|
|
52285
52501
|
* @param id id of the folder
|
|
52286
52502
|
*/
|
|
52287
|
-
getFromState(id) {
|
|
52288
|
-
return
|
|
52289
|
-
const folder = yield this.get(id);
|
|
52503
|
+
getFromState(id, userId) {
|
|
52504
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52505
|
+
const folder = yield this.get(id, userId);
|
|
52290
52506
|
if (!folder) {
|
|
52291
52507
|
return null;
|
|
52292
52508
|
}
|
|
@@ -52296,14 +52512,15 @@ class FolderService {
|
|
|
52296
52512
|
/**
|
|
52297
52513
|
* @deprecated Only use in CLI!
|
|
52298
52514
|
*/
|
|
52299
|
-
getAllDecryptedFromState() {
|
|
52300
|
-
return
|
|
52301
|
-
return yield (0,external_rxjs_.firstValueFrom)(this.folderViews$);
|
|
52515
|
+
getAllDecryptedFromState(userId) {
|
|
52516
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52517
|
+
return yield (0,external_rxjs_.firstValueFrom)(this.folderViews$(userId));
|
|
52302
52518
|
});
|
|
52303
52519
|
}
|
|
52304
|
-
upsert(folderData) {
|
|
52305
|
-
return
|
|
52306
|
-
yield this.
|
|
52520
|
+
upsert(folderData, userId) {
|
|
52521
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52522
|
+
yield this.clearDecryptedFolderState(userId);
|
|
52523
|
+
yield this.encryptedFoldersState(userId).update((folders) => {
|
|
52307
52524
|
if (folders == null) {
|
|
52308
52525
|
folders = {};
|
|
52309
52526
|
}
|
|
@@ -52321,30 +52538,37 @@ class FolderService {
|
|
|
52321
52538
|
});
|
|
52322
52539
|
}
|
|
52323
52540
|
replace(folders, userId) {
|
|
52324
|
-
return
|
|
52541
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52325
52542
|
if (!folders) {
|
|
52326
52543
|
return;
|
|
52327
52544
|
}
|
|
52545
|
+
yield this.clearDecryptedFolderState(userId);
|
|
52328
52546
|
yield this.stateProvider.getUser(userId, FOLDER_ENCRYPTED_FOLDERS).update(() => {
|
|
52329
52547
|
const newFolders = Object.assign({}, folders);
|
|
52330
52548
|
return newFolders;
|
|
52331
52549
|
});
|
|
52332
52550
|
});
|
|
52333
52551
|
}
|
|
52334
|
-
|
|
52335
|
-
return
|
|
52552
|
+
clearDecryptedFolderState(userId) {
|
|
52553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52336
52554
|
if (userId == null) {
|
|
52337
|
-
|
|
52338
|
-
yield this.decryptedFoldersState.forceValue([]);
|
|
52339
|
-
}
|
|
52340
|
-
else {
|
|
52341
|
-
yield this.stateProvider.getUser(userId, FOLDER_ENCRYPTED_FOLDERS).update(() => ({}));
|
|
52555
|
+
throw new Error("User ID is required.");
|
|
52342
52556
|
}
|
|
52557
|
+
yield this.setDecryptedFolders([], userId);
|
|
52343
52558
|
});
|
|
52344
52559
|
}
|
|
52345
|
-
|
|
52346
|
-
return
|
|
52347
|
-
|
|
52560
|
+
clear(userId) {
|
|
52561
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52562
|
+
var _a;
|
|
52563
|
+
(_a = this.forceFolderViews[userId]) === null || _a === void 0 ? void 0 : _a.next([]);
|
|
52564
|
+
yield this.encryptedFoldersState(userId).update(() => ({}));
|
|
52565
|
+
yield this.clearDecryptedFolderState(userId);
|
|
52566
|
+
});
|
|
52567
|
+
}
|
|
52568
|
+
delete(id, userId) {
|
|
52569
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52570
|
+
yield this.clearDecryptedFolderState(userId);
|
|
52571
|
+
yield this.encryptedFoldersState(userId).update((folders) => {
|
|
52348
52572
|
if (folders == null) {
|
|
52349
52573
|
return;
|
|
52350
52574
|
}
|
|
@@ -52367,41 +52591,76 @@ class FolderService {
|
|
|
52367
52591
|
}
|
|
52368
52592
|
}
|
|
52369
52593
|
if (updates.length > 0) {
|
|
52370
|
-
|
|
52371
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
52372
|
-
this.cipherService.upsert(updates.map((c) => c.toCipherData()));
|
|
52594
|
+
yield this.cipherService.upsert(updates.map((c) => c.toCipherData()));
|
|
52373
52595
|
}
|
|
52374
52596
|
}
|
|
52375
52597
|
});
|
|
52376
52598
|
}
|
|
52377
|
-
decryptFolders(folders) {
|
|
52378
|
-
return folder_service_awaiter(this, void 0, void 0, function* () {
|
|
52379
|
-
const decryptFolderPromises = folders.map((f) => f.decrypt());
|
|
52380
|
-
const decryptedFolders = yield Promise.all(decryptFolderPromises);
|
|
52381
|
-
decryptedFolders.sort(utils/* Utils */.A.getSortFunction(this.i18nService, "name"));
|
|
52382
|
-
const noneFolder = new folder_view/* FolderView */.u();
|
|
52383
|
-
noneFolder.name = this.i18nService.t("noneFolder");
|
|
52384
|
-
decryptedFolders.push(noneFolder);
|
|
52385
|
-
return decryptedFolders;
|
|
52386
|
-
});
|
|
52387
|
-
}
|
|
52388
52599
|
getRotatedData(originalUserKey, newUserKey, userId) {
|
|
52389
|
-
return
|
|
52600
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52390
52601
|
if (newUserKey == null) {
|
|
52391
52602
|
throw new Error("New user key is required for rotation.");
|
|
52392
52603
|
}
|
|
52393
52604
|
let encryptedFolders = [];
|
|
52394
|
-
const folders = yield (0,external_rxjs_.firstValueFrom)(this.folderViews$);
|
|
52605
|
+
const folders = yield (0,external_rxjs_.firstValueFrom)(this.folderViews$(userId));
|
|
52395
52606
|
if (!folders) {
|
|
52396
52607
|
return encryptedFolders;
|
|
52397
52608
|
}
|
|
52398
|
-
encryptedFolders = yield Promise.all(folders.map((folder) =>
|
|
52609
|
+
encryptedFolders = yield Promise.all(folders.map((folder) => __awaiter(this, void 0, void 0, function* () {
|
|
52399
52610
|
const encryptedFolder = yield this.encrypt(folder, newUserKey);
|
|
52400
52611
|
return new folder_with_id_request/* FolderWithIdRequest */.T(encryptedFolder);
|
|
52401
52612
|
})));
|
|
52402
52613
|
return encryptedFolders;
|
|
52403
52614
|
});
|
|
52404
52615
|
}
|
|
52616
|
+
/**
|
|
52617
|
+
* Decrypts the folders for a user.
|
|
52618
|
+
* @param userId the user id
|
|
52619
|
+
* @param folderData encrypted folders
|
|
52620
|
+
* @returns a list of decrypted folders
|
|
52621
|
+
*/
|
|
52622
|
+
decryptFolders(userId, folderData) {
|
|
52623
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52624
|
+
// Check if the decrypted folders are already cached
|
|
52625
|
+
const decrypted = yield (0,external_rxjs_.firstValueFrom)(this.stateProvider.getUser(userId, FOLDER_DECRYPTED_FOLDERS).state$);
|
|
52626
|
+
if (decrypted === null || decrypted === void 0 ? void 0 : decrypted.length) {
|
|
52627
|
+
return decrypted;
|
|
52628
|
+
}
|
|
52629
|
+
if (folderData == null) {
|
|
52630
|
+
return [];
|
|
52631
|
+
}
|
|
52632
|
+
const folders = Object.values(folderData).map((f) => new domain_folder/* Folder */.v(f));
|
|
52633
|
+
const userKey = yield (0,external_rxjs_.firstValueFrom)(this.keyService.userKey$(userId));
|
|
52634
|
+
if (!userKey) {
|
|
52635
|
+
return [];
|
|
52636
|
+
}
|
|
52637
|
+
const decryptFolderPromises = folders.map((f) => f.decryptWithKey(userKey, this.encryptService));
|
|
52638
|
+
const decryptedFolders = yield Promise.all(decryptFolderPromises);
|
|
52639
|
+
decryptedFolders.sort(utils/* Utils */.A.getSortFunction(this.i18nService, "name"));
|
|
52640
|
+
const noneFolder = new folder_view/* FolderView */.u();
|
|
52641
|
+
noneFolder.name = this.i18nService.t("noneFolder");
|
|
52642
|
+
decryptedFolders.push(noneFolder);
|
|
52643
|
+
// Cache the decrypted folders
|
|
52644
|
+
yield this.setDecryptedFolders(decryptedFolders, userId);
|
|
52645
|
+
return decryptedFolders;
|
|
52646
|
+
});
|
|
52647
|
+
}
|
|
52648
|
+
/**
|
|
52649
|
+
* @returns a SingleUserState for the encrypted folders.
|
|
52650
|
+
*/
|
|
52651
|
+
encryptedFoldersState(userId) {
|
|
52652
|
+
return this.stateProvider.getUser(userId, FOLDER_ENCRYPTED_FOLDERS);
|
|
52653
|
+
}
|
|
52654
|
+
/**
|
|
52655
|
+
* Sets the decrypted folders state for a user.
|
|
52656
|
+
* @param folders the decrypted folders
|
|
52657
|
+
* @param userId the user id
|
|
52658
|
+
*/
|
|
52659
|
+
setDecryptedFolders(folders, userId) {
|
|
52660
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52661
|
+
yield this.stateProvider.setUserState(FOLDER_DECRYPTED_FOLDERS, folders, userId);
|
|
52662
|
+
});
|
|
52663
|
+
}
|
|
52405
52664
|
}
|
|
52406
52665
|
|
|
52407
52666
|
|
|
@@ -53595,8 +53854,8 @@ class BitwardenJsonImporter extends base_importer_BaseImporter {
|
|
|
53595
53854
|
}
|
|
53596
53855
|
}
|
|
53597
53856
|
|
|
53598
|
-
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts +
|
|
53599
|
-
var src = __webpack_require__(
|
|
53857
|
+
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts + 20 modules
|
|
53858
|
+
var src = __webpack_require__(5907);
|
|
53600
53859
|
;// ../../libs/importer/src/importers/bitwarden/bitwarden-password-protected-importer.ts
|
|
53601
53860
|
var bitwarden_password_protected_importer_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
53602
53861
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -59442,13 +59701,15 @@ class ImportService {
|
|
|
59442
59701
|
|
|
59443
59702
|
/***/ }),
|
|
59444
59703
|
|
|
59445
|
-
/***/
|
|
59704
|
+
/***/ 5907:
|
|
59446
59705
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
59447
59706
|
|
|
59448
59707
|
|
|
59449
59708
|
// EXPORTS
|
|
59450
59709
|
__webpack_require__.d(__webpack_exports__, {
|
|
59451
59710
|
hU: () => (/* reexport */ Argon2KdfConfig),
|
|
59711
|
+
Zm: () => (/* reexport */ BiometricsService),
|
|
59712
|
+
cR: () => (/* reexport */ BiometricsStatus),
|
|
59452
59713
|
QH: () => (/* reexport */ DefaultBiometricStateService),
|
|
59453
59714
|
aT: () => (/* reexport */ DefaultKdfConfigService),
|
|
59454
59715
|
gX: () => (/* reexport */ DefaultKeyService),
|
|
@@ -59456,7 +59717,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
59456
59717
|
n1: () => (/* reexport */ PBKDF2KdfConfig)
|
|
59457
59718
|
});
|
|
59458
59719
|
|
|
59459
|
-
// UNUSED EXPORTS: BIOMETRIC_UNLOCK_ENABLED, BiometricStateService,
|
|
59720
|
+
// UNUSED EXPORTS: BIOMETRIC_UNLOCK_ENABLED, BiometricStateService, BiometricsCommands, DEFAULT_KDF_CONFIG, DISMISSED_REQUIRE_PASSWORD_ON_START_CALLOUT, DefaultUserAsymmetricKeysRegenerationApiService, DefaultUserAsymmetricKeysRegenerationService, ENCRYPTED_CLIENT_KEY_HALF, FINGERPRINT_VALIDATED, KdfConfigService, KeyService, LAST_PROCESS_RELOAD, PROMPT_AUTOMATICALLY, PROMPT_CANCELLED, REQUIRE_PASSWORD_ON_START, UserAsymmetricKeysRegenerationApiService, UserAsymmetricKeysRegenerationService
|
|
59460
59721
|
|
|
59461
59722
|
// EXTERNAL MODULE: external "rxjs"
|
|
59462
59723
|
var external_rxjs_ = __webpack_require__(573);
|
|
@@ -59465,6 +59726,8 @@ var enc_string = __webpack_require__(6505);
|
|
|
59465
59726
|
// EXTERNAL MODULE: ../../libs/common/src/platform/state/index.ts + 3 modules
|
|
59466
59727
|
var state = __webpack_require__(1068);
|
|
59467
59728
|
;// ../../libs/key-management/src/biometrics/biometric.state.ts
|
|
59729
|
+
// FIXME: remove `src` and fix import
|
|
59730
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59468
59731
|
|
|
59469
59732
|
/**
|
|
59470
59733
|
* Indicates whether the user elected to store a biometric key to unlock their vault.
|
|
@@ -59521,6 +59784,12 @@ const PROMPT_AUTOMATICALLY = new state/* UserKeyDefinition */.Ok(state/* BIOMETR
|
|
|
59521
59784
|
const FINGERPRINT_VALIDATED = new state/* KeyDefinition */.Zs(state/* BIOMETRIC_SETTINGS_DISK */.rB, "fingerprintValidated", {
|
|
59522
59785
|
deserializer: (obj) => obj,
|
|
59523
59786
|
});
|
|
59787
|
+
/**
|
|
59788
|
+
* Last process reload time
|
|
59789
|
+
*/
|
|
59790
|
+
const LAST_PROCESS_RELOAD = new state/* KeyDefinition */.Zs(state/* BIOMETRIC_SETTINGS_DISK */.rB, "lastProcessReload", {
|
|
59791
|
+
deserializer: (obj) => new Date(obj),
|
|
59792
|
+
});
|
|
59524
59793
|
|
|
59525
59794
|
;// ../../libs/key-management/src/biometrics/biometric-state.service.ts
|
|
59526
59795
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
@@ -59535,6 +59804,8 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
59535
59804
|
// FIXME: Update this file to be type safe and remove this and next line
|
|
59536
59805
|
// @ts-strict-ignore
|
|
59537
59806
|
|
|
59807
|
+
// FIXME: remove `src` and fix import
|
|
59808
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59538
59809
|
|
|
59539
59810
|
|
|
59540
59811
|
class BiometricStateService {
|
|
@@ -59563,6 +59834,8 @@ class DefaultBiometricStateService {
|
|
|
59563
59834
|
this.promptAutomatically$ = this.promptAutomaticallyState.state$.pipe((0,external_rxjs_.map)(Boolean));
|
|
59564
59835
|
this.fingerprintValidatedState = this.stateProvider.getGlobal(FINGERPRINT_VALIDATED);
|
|
59565
59836
|
this.fingerprintValidated$ = this.fingerprintValidatedState.state$.pipe((0,external_rxjs_.map)(Boolean));
|
|
59837
|
+
this.lastProcessReloadState = this.stateProvider.getGlobal(LAST_PROCESS_RELOAD);
|
|
59838
|
+
this.lastProcessReload$ = this.lastProcessReloadState.state$;
|
|
59566
59839
|
}
|
|
59567
59840
|
setBiometricUnlockEnabled(enabled) {
|
|
59568
59841
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -59673,11 +59946,72 @@ class DefaultBiometricStateService {
|
|
|
59673
59946
|
yield this.fingerprintValidatedState.update(() => validated);
|
|
59674
59947
|
});
|
|
59675
59948
|
}
|
|
59949
|
+
updateLastProcessReload() {
|
|
59950
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59951
|
+
yield this.lastProcessReloadState.update(() => new Date());
|
|
59952
|
+
});
|
|
59953
|
+
}
|
|
59954
|
+
getLastProcessReload() {
|
|
59955
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59956
|
+
return yield (0,external_rxjs_.firstValueFrom)(this.lastProcessReload$);
|
|
59957
|
+
});
|
|
59958
|
+
}
|
|
59676
59959
|
}
|
|
59677
59960
|
function encryptedClientKeyHalfToEncString(encryptedKeyHalf) {
|
|
59678
59961
|
return encryptedKeyHalf == null ? null : new enc_string/* EncString */.k(encryptedKeyHalf);
|
|
59679
59962
|
}
|
|
59680
59963
|
|
|
59964
|
+
;// ../../libs/key-management/src/biometrics/biometrics-status.ts
|
|
59965
|
+
var BiometricsStatus;
|
|
59966
|
+
(function (BiometricsStatus) {
|
|
59967
|
+
/** For the biometrics interface, this means that biometric unlock is available and can be used. Querying for the user specifically, this means that biometric can be used for to unlock this user */
|
|
59968
|
+
BiometricsStatus[BiometricsStatus["Available"] = 0] = "Available";
|
|
59969
|
+
/** Biometrics cannot be used, because the userkey needs to first be unlocked by the user's password, because unlock needs some volatile data that is not available on app-start */
|
|
59970
|
+
BiometricsStatus[BiometricsStatus["UnlockNeeded"] = 1] = "UnlockNeeded";
|
|
59971
|
+
/** Biometric hardware is not available (i.e laptop folded shut, sensor unplugged) */
|
|
59972
|
+
BiometricsStatus[BiometricsStatus["HardwareUnavailable"] = 2] = "HardwareUnavailable";
|
|
59973
|
+
/** Only relevant for linux, this means that polkit policies need to be set up and that can happen automatically */
|
|
59974
|
+
BiometricsStatus[BiometricsStatus["AutoSetupNeeded"] = 3] = "AutoSetupNeeded";
|
|
59975
|
+
/** Only relevant for linux, this means that polkit policies need to be set up but that needs to be done manually */
|
|
59976
|
+
BiometricsStatus[BiometricsStatus["ManualSetupNeeded"] = 4] = "ManualSetupNeeded";
|
|
59977
|
+
/** Biometrics is not implemented for this platform (i.e web) */
|
|
59978
|
+
BiometricsStatus[BiometricsStatus["PlatformUnsupported"] = 5] = "PlatformUnsupported";
|
|
59979
|
+
/** Browser extension cannot connect to the desktop app to use biometrics */
|
|
59980
|
+
BiometricsStatus[BiometricsStatus["DesktopDisconnected"] = 6] = "DesktopDisconnected";
|
|
59981
|
+
/** Biometrics is not enabled in the desktop app/extension (current app) */
|
|
59982
|
+
BiometricsStatus[BiometricsStatus["NotEnabledLocally"] = 7] = "NotEnabledLocally";
|
|
59983
|
+
/** Only on browser extension; Biometrics is not enabled in the desktop app */
|
|
59984
|
+
BiometricsStatus[BiometricsStatus["NotEnabledInConnectedDesktopApp"] = 8] = "NotEnabledInConnectedDesktopApp";
|
|
59985
|
+
/** Browser extension does not have the permission to talk to the desktop app */
|
|
59986
|
+
BiometricsStatus[BiometricsStatus["NativeMessagingPermissionMissing"] = 9] = "NativeMessagingPermissionMissing";
|
|
59987
|
+
})(BiometricsStatus || (BiometricsStatus = {}));
|
|
59988
|
+
|
|
59989
|
+
;// ../../libs/key-management/src/biometrics/biometrics-commands.ts
|
|
59990
|
+
var BiometricsCommands;
|
|
59991
|
+
(function (BiometricsCommands) {
|
|
59992
|
+
/** Perform biometric authentication for the system's user. Does not require setup, and does not return cryptographic material, only yes or no. */
|
|
59993
|
+
BiometricsCommands["AuthenticateWithBiometrics"] = "authenticateWithBiometrics";
|
|
59994
|
+
/** Get biometric status of the system, and can be used before biometrics is set up. Only returns data about the biometrics system, not about availability of cryptographic material */
|
|
59995
|
+
BiometricsCommands["GetBiometricsStatus"] = "getBiometricsStatus";
|
|
59996
|
+
/** Perform biometric authentication for the system's user for the given bitwarden account's credentials. This returns cryptographic material that can be used to unlock the vault. */
|
|
59997
|
+
BiometricsCommands["UnlockWithBiometricsForUser"] = "unlockWithBiometricsForUser";
|
|
59998
|
+
/** Get biometric status for a specific user account. This includes both information about availability of cryptographic material (is the user configured for biometric unlock? is a masterpassword unlock needed? But also information about the biometric system's availability in a single status) */
|
|
59999
|
+
BiometricsCommands["GetBiometricsStatusForUser"] = "getBiometricsStatusForUser";
|
|
60000
|
+
// legacy
|
|
60001
|
+
BiometricsCommands["Unlock"] = "biometricUnlock";
|
|
60002
|
+
BiometricsCommands["IsAvailable"] = "biometricUnlockAvailable";
|
|
60003
|
+
})(BiometricsCommands || (BiometricsCommands = {}));
|
|
60004
|
+
|
|
60005
|
+
;// ../../libs/key-management/src/biometrics/biometric.service.ts
|
|
60006
|
+
/**
|
|
60007
|
+
* The biometrics service is used to provide access to the status of and access to biometric functionality on the platforms.
|
|
60008
|
+
*/
|
|
60009
|
+
class BiometricsService {
|
|
60010
|
+
supportsBiometric() {
|
|
60011
|
+
throw new Error("Method not implemented.");
|
|
60012
|
+
}
|
|
60013
|
+
}
|
|
60014
|
+
|
|
59681
60015
|
;// ../../libs/key-management/src/abstractions/key.service.ts
|
|
59682
60016
|
class UserPrivateKeyDecryptionFailedError extends Error {
|
|
59683
60017
|
constructor() {
|
|
@@ -59761,8 +60095,8 @@ class ProviderEncryptedOrganizationKey {
|
|
|
59761
60095
|
}
|
|
59762
60096
|
}
|
|
59763
60097
|
|
|
59764
|
-
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts +
|
|
59765
|
-
var enums = __webpack_require__(
|
|
60098
|
+
// EXTERNAL MODULE: ../../libs/common/src/platform/enums/index.ts + 7 modules
|
|
60099
|
+
var enums = __webpack_require__(5874);
|
|
59766
60100
|
;// ../../libs/common/src/platform/misc/convert-values.ts
|
|
59767
60101
|
// FIXME: Update this file to be type safe and remove this and next line
|
|
59768
60102
|
// @ts-strict-ignore
|
|
@@ -59837,17 +60171,41 @@ var key_service_awaiter = (undefined && undefined.__awaiter) || function (thisAr
|
|
|
59837
60171
|
// @ts-strict-ignore
|
|
59838
60172
|
|
|
59839
60173
|
|
|
60174
|
+
// FIXME: remove `src` and fix import
|
|
60175
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59840
60176
|
|
|
60177
|
+
// FIXME: remove `src` and fix import
|
|
60178
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59841
60179
|
|
|
60180
|
+
// FIXME: remove `src` and fix import
|
|
60181
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59842
60182
|
|
|
60183
|
+
// FIXME: remove `src` and fix import
|
|
60184
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59843
60185
|
|
|
60186
|
+
// FIXME: remove `src` and fix import
|
|
60187
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59844
60188
|
|
|
60189
|
+
// FIXME: remove `src` and fix import
|
|
60190
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59845
60191
|
|
|
60192
|
+
// FIXME: remove `src` and fix import
|
|
60193
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59846
60194
|
|
|
60195
|
+
// FIXME: remove `src` and fix import
|
|
60196
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59847
60197
|
|
|
60198
|
+
// FIXME: remove `src` and fix import
|
|
60199
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59848
60200
|
|
|
60201
|
+
// FIXME: remove `src` and fix import
|
|
60202
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59849
60203
|
|
|
60204
|
+
// FIXME: remove `src` and fix import
|
|
60205
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59850
60206
|
|
|
60207
|
+
// FIXME: remove `src` and fix import
|
|
60208
|
+
// eslint-disable-next-line no-restricted-imports
|
|
59851
60209
|
|
|
59852
60210
|
|
|
59853
60211
|
class DefaultKeyService {
|
|
@@ -60556,7 +60914,7 @@ class DefaultKeyService {
|
|
|
60556
60914
|
if (encryptedPrivateKey == null) {
|
|
60557
60915
|
return null;
|
|
60558
60916
|
}
|
|
60559
|
-
return (yield this.encryptService.decryptToBytes(new enc_string/* EncString */.k(encryptedPrivateKey), key));
|
|
60917
|
+
return (yield this.encryptService.decryptToBytes(new enc_string/* EncString */.k(encryptedPrivateKey), key, "Content: Encrypted Private Key"));
|
|
60560
60918
|
});
|
|
60561
60919
|
}
|
|
60562
60920
|
providerKeys$(userId) {
|
|
@@ -60665,6 +61023,8 @@ var KdfType;
|
|
|
60665
61023
|
})(KdfType || (KdfType = {}));
|
|
60666
61024
|
|
|
60667
61025
|
;// ../../libs/key-management/src/models/kdf-config.ts
|
|
61026
|
+
// FIXME: remove `src` and fix import
|
|
61027
|
+
// eslint-disable-next-line no-restricted-imports
|
|
60668
61028
|
|
|
60669
61029
|
|
|
60670
61030
|
/**
|
|
@@ -60763,6 +61123,8 @@ var kdf_config_service_awaiter = (undefined && undefined.__awaiter) || function
|
|
|
60763
61123
|
// FIXME: Update this file to be type safe and remove this and next line
|
|
60764
61124
|
// @ts-strict-ignore
|
|
60765
61125
|
|
|
61126
|
+
// FIXME: remove `src` and fix import
|
|
61127
|
+
// eslint-disable-next-line no-restricted-imports
|
|
60766
61128
|
|
|
60767
61129
|
|
|
60768
61130
|
|
|
@@ -60852,11 +61214,21 @@ class DefaultUserAsymmetricKeysRegenerationService {
|
|
|
60852
61214
|
}
|
|
60853
61215
|
shouldRegenerate(userId) {
|
|
60854
61216
|
return default_user_asymmetric_key_regeneration_service_awaiter(this, void 0, void 0, function* () {
|
|
60855
|
-
const
|
|
60856
|
-
|
|
61217
|
+
const userKey = yield firstValueFrom(this.keyService.userKey$(userId));
|
|
61218
|
+
// For SSO logins from untrusted devices, the userKey will not be available, and the private key regeneration process should be skipped.
|
|
61219
|
+
// In such cases, regeneration will occur on the following device login flow.
|
|
61220
|
+
if (!userKey) {
|
|
61221
|
+
this.logService.info("[UserAsymmetricKeyRegeneration] User symmetric key unavailable, skipping regeneration for the user.");
|
|
61222
|
+
return false;
|
|
61223
|
+
}
|
|
61224
|
+
const [userKeyEncryptedPrivateKey, publicKeyResponse] = yield firstValueFrom(combineLatest([
|
|
60857
61225
|
this.keyService.userEncryptedPrivateKey$(userId),
|
|
60858
61226
|
this.apiService.getUserPublicKey(userId),
|
|
60859
61227
|
]));
|
|
61228
|
+
if (!userKeyEncryptedPrivateKey || !publicKeyResponse) {
|
|
61229
|
+
this.logService.warning("[UserAsymmetricKeyRegeneration] User's asymmetric key initialization data is unavailable, skipping regeneration.");
|
|
61230
|
+
return false;
|
|
61231
|
+
}
|
|
60860
61232
|
const verificationResponse = yield firstValueFrom(this.sdkService.client$.pipe(map((sdk) => {
|
|
60861
61233
|
if (sdk === undefined) {
|
|
60862
61234
|
throw new Error("SDK is undefined");
|
|
@@ -60977,6 +61349,8 @@ class DefaultUserAsymmetricKeysRegenerationApiService {
|
|
|
60977
61349
|
|
|
60978
61350
|
|
|
60979
61351
|
|
|
61352
|
+
|
|
61353
|
+
|
|
60980
61354
|
/***/ }),
|
|
60981
61355
|
|
|
60982
61356
|
/***/ 3582:
|
|
@@ -61033,7 +61407,7 @@ class NodeUtils {
|
|
|
61033
61407
|
|
|
61034
61408
|
/***/ }),
|
|
61035
61409
|
|
|
61036
|
-
/***/
|
|
61410
|
+
/***/ 8248:
|
|
61037
61411
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
61038
61412
|
|
|
61039
61413
|
|
|
@@ -61048,12 +61422,6 @@ const external_crypto_namespaceObject = require("crypto");
|
|
|
61048
61422
|
const external_node_forge_namespaceObject = require("node-forge");
|
|
61049
61423
|
// EXTERNAL MODULE: ../../libs/common/src/platform/misc/utils.ts + 2 modules
|
|
61050
61424
|
var utils = __webpack_require__(6948);
|
|
61051
|
-
;// ../../libs/common/src/platform/models/domain/decrypt-parameters.ts
|
|
61052
|
-
// FIXME: Update this file to be type safe and remove this and next line
|
|
61053
|
-
// @ts-strict-ignore
|
|
61054
|
-
class DecryptParameters {
|
|
61055
|
-
}
|
|
61056
|
-
|
|
61057
61425
|
;// ../../libs/node/src/services/node-crypto-function.service.ts
|
|
61058
61426
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
61059
61427
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -61064,9 +61432,6 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
61064
61432
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
61065
61433
|
});
|
|
61066
61434
|
};
|
|
61067
|
-
// FIXME: Update this file to be type safe and remove this and next line
|
|
61068
|
-
// @ts-strict-ignore
|
|
61069
|
-
|
|
61070
61435
|
|
|
61071
61436
|
|
|
61072
61437
|
|
|
@@ -61189,7 +61554,7 @@ class NodeCryptoFunctionService {
|
|
|
61189
61554
|
return Promise.resolve(this.toUint8Buffer(encBuf));
|
|
61190
61555
|
}
|
|
61191
61556
|
aesDecryptFastParameters(data, iv, mac, key) {
|
|
61192
|
-
const p =
|
|
61557
|
+
const p = {};
|
|
61193
61558
|
p.encKey = key.encKey;
|
|
61194
61559
|
p.data = utils/* Utils */.A.fromB64ToArray(data);
|
|
61195
61560
|
p.iv = utils/* Utils */.A.fromB64ToArray(iv);
|
|
@@ -61205,15 +61570,16 @@ class NodeCryptoFunctionService {
|
|
|
61205
61570
|
}
|
|
61206
61571
|
return p;
|
|
61207
61572
|
}
|
|
61208
|
-
aesDecryptFast(
|
|
61209
|
-
return __awaiter(this,
|
|
61210
|
-
const
|
|
61573
|
+
aesDecryptFast(_a) {
|
|
61574
|
+
return __awaiter(this, arguments, void 0, function* ({ mode, parameters, }) {
|
|
61575
|
+
const iv = mode === "cbc" ? parameters.iv : null;
|
|
61576
|
+
const decBuf = yield this.aesDecrypt(parameters.data, iv, parameters.encKey, mode);
|
|
61211
61577
|
return utils/* Utils */.A.fromBufferToUtf8(decBuf);
|
|
61212
61578
|
});
|
|
61213
61579
|
}
|
|
61214
61580
|
aesDecrypt(data, iv, key, mode) {
|
|
61215
61581
|
const nodeData = this.toNodeBuffer(data);
|
|
61216
|
-
const nodeIv =
|
|
61582
|
+
const nodeIv = this.toNodeBufferOrNull(iv);
|
|
61217
61583
|
const nodeKey = this.toNodeBuffer(key);
|
|
61218
61584
|
const decipher = external_crypto_namespaceObject.createDecipheriv(this.toNodeCryptoAesMode(mode), nodeKey, nodeIv);
|
|
61219
61585
|
const decBuf = Buffer.concat([decipher.update(nodeData), decipher.final()]);
|
|
@@ -61297,6 +61663,12 @@ class NodeCryptoFunctionService {
|
|
|
61297
61663
|
toNodeBuffer(value) {
|
|
61298
61664
|
return Buffer.from(value);
|
|
61299
61665
|
}
|
|
61666
|
+
toNodeBufferOrNull(value) {
|
|
61667
|
+
if (value == null) {
|
|
61668
|
+
return null;
|
|
61669
|
+
}
|
|
61670
|
+
return this.toNodeBuffer(value);
|
|
61671
|
+
}
|
|
61300
61672
|
toUint8Buffer(value) {
|
|
61301
61673
|
let buf;
|
|
61302
61674
|
if (typeof value === "string") {
|
|
@@ -61437,8 +61809,8 @@ var enums = __webpack_require__(8713);
|
|
|
61437
61809
|
var cipher_data = __webpack_require__(847);
|
|
61438
61810
|
// EXTERNAL MODULE: ../../libs/common/src/vault/models/domain/cipher.ts
|
|
61439
61811
|
var domain_cipher = __webpack_require__(3481);
|
|
61440
|
-
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts +
|
|
61441
|
-
var src = __webpack_require__(
|
|
61812
|
+
// EXTERNAL MODULE: ../../libs/key-management/src/index.ts + 20 modules
|
|
61813
|
+
var src = __webpack_require__(5907);
|
|
61442
61814
|
;// ../../libs/tools/export/vault-export/vault-export-core/src/services/base-vault-export.service.ts
|
|
61443
61815
|
var base_vault_export_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
61444
61816
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -61779,6 +62151,7 @@ class IndividualVaultExportService extends BaseVaultExportService {
|
|
|
61779
62151
|
this.cipherService = cipherService;
|
|
61780
62152
|
this.keyService = keyService;
|
|
61781
62153
|
this.accountService = accountService;
|
|
62154
|
+
this.activeUserId$ = this.accountService.activeAccount$.pipe((0,external_rxjs_.map)((a) => a === null || a === void 0 ? void 0 : a.id));
|
|
61782
62155
|
}
|
|
61783
62156
|
getExport() {
|
|
61784
62157
|
return individual_vault_export_service_awaiter(this, arguments, void 0, function* (format = "csv") {
|
|
@@ -61799,7 +62172,8 @@ class IndividualVaultExportService extends BaseVaultExportService {
|
|
|
61799
62172
|
let decFolders = [];
|
|
61800
62173
|
let decCiphers = [];
|
|
61801
62174
|
const promises = [];
|
|
61802
|
-
|
|
62175
|
+
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.activeUserId$);
|
|
62176
|
+
promises.push((0,external_rxjs_.firstValueFrom)(this.folderService.folderViews$(activeUserId)).then((folders) => {
|
|
61803
62177
|
decFolders = folders;
|
|
61804
62178
|
}));
|
|
61805
62179
|
promises.push(this.cipherService.getAllDecrypted().then((ciphers) => {
|
|
@@ -61817,15 +62191,15 @@ class IndividualVaultExportService extends BaseVaultExportService {
|
|
|
61817
62191
|
let folders = [];
|
|
61818
62192
|
let ciphers = [];
|
|
61819
62193
|
const promises = [];
|
|
61820
|
-
|
|
62194
|
+
const activeUserId = yield (0,external_rxjs_.firstValueFrom)(this.activeUserId$);
|
|
62195
|
+
promises.push((0,external_rxjs_.firstValueFrom)(this.folderService.folders$(activeUserId)).then((f) => {
|
|
61821
62196
|
folders = f;
|
|
61822
62197
|
}));
|
|
61823
62198
|
promises.push(this.cipherService.getAll().then((c) => {
|
|
61824
62199
|
ciphers = c.filter((f) => f.deletedDate == null);
|
|
61825
62200
|
}));
|
|
61826
62201
|
yield Promise.all(promises);
|
|
61827
|
-
const
|
|
61828
|
-
const userKey = yield this.keyService.getUserKeyWithLegacySupport(activeUserId);
|
|
62202
|
+
const userKey = yield this.keyService.getUserKeyWithLegacySupport(yield (0,external_rxjs_.firstValueFrom)(this.activeUserId$));
|
|
61829
62203
|
const encKeyValidation = yield this.encryptService.encrypt(utils/* Utils */.A.newGuid(), userKey);
|
|
61830
62204
|
const jsonDoc = {
|
|
61831
62205
|
encrypted: true,
|
|
@@ -63592,6 +63966,7 @@ const PASSPHRASE = Object.freeze({
|
|
|
63592
63966
|
generateKey: "generatePassphrase",
|
|
63593
63967
|
generatedValueKey: "passphrase",
|
|
63594
63968
|
copyKey: "copyPassphrase",
|
|
63969
|
+
useGeneratedValueKey: "useThisPassphrase",
|
|
63595
63970
|
onlyOnRequest: false,
|
|
63596
63971
|
request: [],
|
|
63597
63972
|
engine: {
|
|
@@ -63646,6 +64021,7 @@ const PASSWORD = Object.freeze({
|
|
|
63646
64021
|
generateKey: "generatePassword",
|
|
63647
64022
|
generatedValueKey: "password",
|
|
63648
64023
|
copyKey: "copyPassword",
|
|
64024
|
+
useGeneratedValueKey: "useThisPassword",
|
|
63649
64025
|
onlyOnRequest: false,
|
|
63650
64026
|
request: [],
|
|
63651
64027
|
engine: {
|
|
@@ -63717,6 +64093,7 @@ const USERNAME = Object.freeze({
|
|
|
63717
64093
|
generateKey: "generateUsername",
|
|
63718
64094
|
generatedValueKey: "username",
|
|
63719
64095
|
copyKey: "copyUsername",
|
|
64096
|
+
useGeneratedValueKey: "useThisUsername",
|
|
63720
64097
|
onlyOnRequest: false,
|
|
63721
64098
|
request: [],
|
|
63722
64099
|
engine: {
|
|
@@ -63765,6 +64142,7 @@ const CATCHALL = Object.freeze({
|
|
|
63765
64142
|
generateKey: "generateEmail",
|
|
63766
64143
|
generatedValueKey: "email",
|
|
63767
64144
|
copyKey: "copyEmail",
|
|
64145
|
+
useGeneratedValueKey: "useThisEmail",
|
|
63768
64146
|
onlyOnRequest: false,
|
|
63769
64147
|
request: [],
|
|
63770
64148
|
engine: {
|
|
@@ -63816,6 +64194,7 @@ const SUBADDRESS = Object.freeze({
|
|
|
63816
64194
|
generateKey: "generateEmail",
|
|
63817
64195
|
generatedValueKey: "email",
|
|
63818
64196
|
copyKey: "copyEmail",
|
|
64197
|
+
useGeneratedValueKey: "useThisEmail",
|
|
63819
64198
|
onlyOnRequest: false,
|
|
63820
64199
|
request: [],
|
|
63821
64200
|
engine: {
|
|
@@ -63868,6 +64247,7 @@ function generators_toCredentialGeneratorConfiguration(configuration) {
|
|
|
63868
64247
|
generateKey: "generateEmail",
|
|
63869
64248
|
generatedValueKey: "email",
|
|
63870
64249
|
copyKey: "copyEmail",
|
|
64250
|
+
useGeneratedValueKey: "useThisEmail",
|
|
63871
64251
|
onlyOnRequest: true,
|
|
63872
64252
|
request: configuration.forwarder.request,
|
|
63873
64253
|
engine: {
|
|
@@ -65398,6 +65778,7 @@ class CredentialGeneratorService {
|
|
|
65398
65778
|
generate: this.i18nService.t(generator.generateKey),
|
|
65399
65779
|
generatedValue: this.i18nService.t(generator.generatedValueKey),
|
|
65400
65780
|
copy: this.i18nService.t(generator.copyKey),
|
|
65781
|
+
useGeneratedValue: this.i18nService.t(generator.useGeneratedValueKey),
|
|
65401
65782
|
onlyOnRequest: generator.onlyOnRequest,
|
|
65402
65783
|
request: generator.request,
|
|
65403
65784
|
};
|
|
@@ -67276,7 +67657,7 @@ module.exports = require("path");
|
|
|
67276
67657
|
/***/ 8330:
|
|
67277
67658
|
/***/ ((module) => {
|
|
67278
67659
|
|
|
67279
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2025.1.
|
|
67660
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2025.1.1","keywords":["bitwarden","password","vault","password manager","cli"],"author":"Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)","homepage":"https://bitwarden.com","repository":{"type":"git","url":"https://github.com/bitwarden/clients"},"license":"SEE LICENSE IN LICENSE.txt","scripts":{"clean":"rimraf dist","build:oss":"cross-env NODE_OPTIONS=\\"--max-old-space-size=8192\\" webpack","build:oss:debug":"npm run build:oss && node --inspect ./build/bw.js","build:oss:watch":"webpack --watch","build:oss:prod":"cross-env NODE_ENV=production webpack","build:oss:prod:watch":"cross-env NODE_ENV=production webpack --watch","debug":"node --inspect ./build/bw.js","publish:npm":"npm run build:oss:prod && npm publish --access public","build:bit":"cross-env NODE_OPTIONS=\\"--max-old-space-size=8192\\" webpack -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:debug":"npm run build:bit && node --inspect ./build/bw.js","build:bit:watch":"webpack --watch -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:prod":"cross-env NODE_ENV=production npm run build:bit","build:bit:prod:watch":"cross-env NODE_ENV=production npm run build:bit:watch","dist:oss:win":"npm run build:oss:prod && npm run clean && npm run package:oss:win","dist:oss:mac":"npm run build:oss:prod && npm run clean && npm run package:oss:mac","dist:oss:lin":"npm run build:oss:prod && npm run clean && npm run package:oss:lin","dist:bit:win":"npm run build:bit:prod && npm run clean && npm run package:bit:win","dist:bit:mac":"npm run build:bit:prod && npm run clean && npm run package:bit:mac","dist:bit:lin":"npm run build:bit:prod && npm run clean && npm run package:bit:lin","package:oss:win":"pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe","package:oss:mac":"pkg . --targets macos-x64 --output ./dist/oss/macos/bw","package:oss:lin":"pkg . --targets linux-x64 --output ./dist/oss/linux/bw","package:bit:win":"pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe","package:bit:mac":"pkg . --targets macos-x64 --output ./dist/bit/macos/bw","package:bit:lin":"pkg . --targets linux-x64 --output ./dist/bit/linux/bw","test":"jest","test:watch":"jest --watch","test:watch:all":"jest --watchAll"},"bin":{"bw":"build/bw.js"},"pkg":{"assets":["./build/**/*","../../node_modules/argon2/**/*"]},"dependencies":{"@koa/multer":"3.0.2","@koa/router":"13.1.0","argon2":"0.41.1","big-integer":"1.6.52","browser-hrtime":"1.1.8","chalk":"4.1.2","commander":"11.1.0","form-data":"4.0.0","https-proxy-agent":"7.0.5","inquirer":"8.2.6","jsdom":"25.0.1","jszip":"3.10.1","koa":"2.15.3","koa-bodyparser":"4.4.1","koa-json":"2.0.2","lowdb":"1.0.0","lunr":"2.3.9","multer":"1.4.5-lts.1","node-fetch":"2.6.12","node-forge":"1.3.1","open":"8.4.2","papaparse":"5.4.1","proper-lockfile":"4.1.2","rxjs":"7.8.1","tldts":"6.1.71","zxcvbn":"4.4.2"}}');
|
|
67280
67661
|
|
|
67281
67662
|
/***/ }),
|
|
67282
67663
|
|