1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-16 01:51:21 +01:00

Allow UpdateKeyAsync when user already has key

This commit is contained in:
Kyle Spearrin 2018-11-13 11:37:09 -05:00
parent a9195942fd
commit 73cc221deb

View File

@ -548,11 +548,6 @@ namespace Bit.Core.Services
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.SecurityStamp = Guid.NewGuid().ToString();
user.Key = key;