1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 23:33:41 +00:00
This commit is contained in:
Bernd Schoolmann
2025-12-05 14:58:03 +01:00
parent 4f6e7ac287
commit 216e7a47be
2 changed files with 11 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ services:
- mssql_dev_data:/var/opt/mssql - mssql_dev_data:/var/opt/mssql
- ../util/Migrator:/mnt/migrator/ - ../util/Migrator:/mnt/migrator/
- ./helpers/mssql:/mnt/helpers - ./helpers/mssql:/mnt/helpers
- mssql_data:/mssql:/mnt/data - ./.data/mssql:/mnt/data
ports: ports:
- "1433:1433" - "1433:1433"
profiles: profiles:
@@ -26,7 +26,7 @@ services:
- "10001:10001" - "10001:10001"
- "10002:10002" - "10002:10002"
volumes: volumes:
- azurite_data:/azurite:/data - ./.data/azurite:/data
profiles: profiles:
- storage - storage
- cloud - cloud
@@ -152,5 +152,3 @@ volumes:
mariadb_dev_data: mariadb_dev_data:
rabbitmq_data: rabbitmq_data:
redis_data: redis_data:
azurite_data:
mssql_data:

View File

@@ -19,6 +19,7 @@ using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.KeyManagement.Commands.Interfaces; using Bit.Core.KeyManagement.Commands.Interfaces;
using Bit.Core.KeyManagement.Kdf; using Bit.Core.KeyManagement.Kdf;
using Bit.Core.KeyManagement.Models.Data;
using Bit.Core.KeyManagement.Queries.Interfaces; using Bit.Core.KeyManagement.Queries.Interfaces;
using Bit.Core.Models.Api.Response; using Bit.Core.Models.Api.Response;
using Bit.Core.Repositories; using Bit.Core.Repositories;
@@ -447,13 +448,20 @@ public class AccountsController : Controller
if (model.AccountKeys != null) if (model.AccountKeys != null)
{ {
await _setAccountKeysForUserCommand.SetAccountKeysForUserAsync(user, model.AccountKeys); await _setAccountKeysForUserCommand.SetAccountKeysForUserAsync(user, model.AccountKeys);
return new KeysResponseModel(model.AccountKeys?.ToAccountKeysData(), user.Key);
} }
else else
{ {
await _userService.SaveUserAsync(model.ToUser(user)); await _userService.SaveUserAsync(model.ToUser(user));
return new KeysResponseModel(new UserAccountKeysData
{
PublicKeyEncryptionKeyPairData = new PublicKeyEncryptionKeyPairData(
user.PrivateKey,
user.PublicKey
)
}, user.Key);
} }
return new KeysResponseModel(model.AccountKeys.ToAccountKeysData(), user.Key);
} }
[HttpGet("keys")] [HttpGet("keys")]