mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
Allow UpdateKeyAsync when user already has key
This commit is contained in:
@ -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;
|
||||||
|
Reference in New Issue
Block a user