1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Remove hints from responses (#4635)

This commit is contained in:
Matt Gibson 2024-08-23 10:51:21 -07:00 committed by GitHub
parent 8ab19c7b00
commit aa66b5ad11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 5 deletions

View File

@ -8,13 +8,12 @@ public class UpdateProfileRequestModel
[StringLength(50)]
public string Name { get; set; }
[StringLength(50)]
[Obsolete("Changes will be made via the 'password' endpoint going forward.")]
[Obsolete("This field is ignored. Changes are made via the 'password' endpoint.")]
public string MasterPasswordHint { get; set; }
public User ToUser(User existingUser)
{
existingUser.Name = Name;
existingUser.MasterPasswordHint = string.IsNullOrWhiteSpace(MasterPasswordHint) ? null : MasterPasswordHint;
return existingUser;
}
}

View File

@ -27,7 +27,6 @@ public class ProfileResponseModel : ResponseModel
EmailVerified = user.EmailVerified;
Premium = user.Premium;
PremiumFromOrganization = premiumFromOrganization;
MasterPasswordHint = string.IsNullOrWhiteSpace(user.MasterPasswordHint) ? null : user.MasterPasswordHint;
Culture = user.Culture;
TwoFactorEnabled = twoFactorEnabled;
Key = user.Key;
@ -53,7 +52,6 @@ public class ProfileResponseModel : ResponseModel
public bool EmailVerified { get; set; }
public bool Premium { get; set; }
public bool PremiumFromOrganization { get; set; }
public string MasterPasswordHint { get; set; }
public string Culture { get; set; }
public bool TwoFactorEnabled { get; set; }
public string Key { get; set; }

View File

@ -30,7 +30,6 @@ public class AccountsControllerTest : IClassFixture<ApiApplicationFactory>
Assert.False(content.EmailVerified);
Assert.False(content.Premium);
Assert.False(content.PremiumFromOrganization);
Assert.Null(content.MasterPasswordHint);
Assert.Equal("en-US", content.Culture);
Assert.Null(content.Key);
Assert.Null(content.PrivateKey);