mirror of
https://github.com/bitwarden/server.git
synced 2025-04-17 19:18:16 -05:00
Allow UpdateKeyAsync when user already has key
This commit is contained in:
parent
a9195942fd
commit
73cc221deb
@ -548,11 +548,6 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
if(await CheckPasswordAsync(user, masterPassword))
|
if(await CheckPasswordAsync(user, masterPassword))
|
||||||
{
|
{
|
||||||
if(!string.IsNullOrWhiteSpace(user.Key))
|
|
||||||
{
|
|
||||||
throw new BadRequestException("User already has an updated encryption key.");
|
|
||||||
}
|
|
||||||
|
|
||||||
user.RevisionDate = user.AccountRevisionDate = DateTime.UtcNow;
|
user.RevisionDate = user.AccountRevisionDate = DateTime.UtcNow;
|
||||||
user.SecurityStamp = Guid.NewGuid().ToString();
|
user.SecurityStamp = Guid.NewGuid().ToString();
|
||||||
user.Key = key;
|
user.Key = key;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user