1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

[PM-3777[PM-3633] Update minimum KDF iterations when creating new User record (#3687)

* Updated minimum iterations on new Users to the default.

* Fixed test I missed.
This commit is contained in:
Todd Martin
2024-01-25 10:59:53 -05:00
committed by GitHub
parent bac06763f5
commit 2763345e9e
5 changed files with 6 additions and 5 deletions

View File

@ -38,7 +38,7 @@ public class RegisterRequestModel : IValidatableObject, ICaptchaProtectedModel
Email = Email,
MasterPasswordHint = MasterPasswordHint,
Kdf = Kdf.GetValueOrDefault(KdfType.PBKDF2_SHA256),
KdfIterations = KdfIterations.GetValueOrDefault(5000),
KdfIterations = KdfIterations.GetValueOrDefault(AuthConstants.PBKDF2_ITERATIONS.Default),
KdfMemory = KdfMemory,
KdfParallelism = KdfParallelism
};

View File

@ -55,7 +55,7 @@ public class User : ITableObject<Guid>, ISubscriber, IStorable, IStorableSubscri
[MaxLength(30)]
public string ApiKey { get; set; }
public KdfType Kdf { get; set; } = KdfType.PBKDF2_SHA256;
public int KdfIterations { get; set; } = 5000;
public int KdfIterations { get; set; } = AuthConstants.PBKDF2_ITERATIONS.Default;
public int? KdfMemory { get; set; }
public int? KdfParallelism { get; set; }
public DateTime CreationDate { get; set; } = DateTime.UtcNow;