From 4e4b56d7fe85f3df4e2fe64fe8996c8c99cd6a71 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 30 Jul 2018 22:42:54 -0400 Subject: [PATCH] password updated fixes --- src/App/Models/Cipher.cs | 2 +- src/App/Pages/Vault/VaultEditCipherPage.cs | 5 +++-- src/App/Pages/Vault/VaultViewCipherPage.cs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/App/Models/Cipher.cs b/src/App/Models/Cipher.cs index 4191d1d4e..4e1058748 100644 --- a/src/App/Models/Cipher.cs +++ b/src/App/Models/Cipher.cs @@ -87,6 +87,6 @@ namespace Bit.App.Models public SecureNote SecureNote { get; set; } public System.DateTime? PasswordRevisionDisplayDate => - Login?.Password == null ? (System.DateTime?)null : Login.PasswordRevisionDate ?? RevisionDate; + Login?.Password == null ? null : Login.PasswordRevisionDate; } } diff --git a/src/App/Pages/Vault/VaultEditCipherPage.cs b/src/App/Pages/Vault/VaultEditCipherPage.cs index beac296ff..c962cbf1d 100644 --- a/src/App/Pages/Vault/VaultEditCipherPage.cs +++ b/src/App/Pages/Vault/VaultEditCipherPage.cs @@ -499,7 +499,7 @@ namespace Bit.App.Pages Cipher.Notes = string.IsNullOrWhiteSpace(NotesCell.Editor.Text) ? null : NotesCell.Editor.Text.Encrypt(Cipher.OrganizationId); Cipher.Favorite = FavoriteCell.On; - + var passwordHistory = Cipher.PasswordHistory?.ToList() ?? new List(); switch(Cipher.Type) { @@ -512,6 +512,7 @@ namespace Bit.App.Pages LoginPasswordCell.Entry.Text.Encrypt(Cipher.OrganizationId), Totp = string.IsNullOrWhiteSpace(LoginTotpCell.Entry.Text) ? null : LoginTotpCell.Entry.Text.Encrypt(Cipher.OrganizationId), + PasswordRevisionDate = Cipher.Login.PasswordRevisionDate, }; if(!string.IsNullOrWhiteSpace(_originalLoginPassword) && @@ -671,7 +672,7 @@ namespace Bit.App.Pages Password = (cf.Item1 + ": " + cf.Item2).Encrypt(Cipher.OrganizationId), }); } - Cipher.PasswordHistory = (passwordHistory?.Count ?? 0) > 0 ? passwordHistory : null; + Cipher.PasswordHistory = (passwordHistory?.Count ?? 0) > 0 ? passwordHistory.Take(5) : null; await _deviceActionService.ShowLoadingAsync(AppResources.Saving); var saveTask = await _cipherService.SaveAsync(Cipher); diff --git a/src/App/Pages/Vault/VaultViewCipherPage.cs b/src/App/Pages/Vault/VaultViewCipherPage.cs index 15e8fb8bf..82ad89c68 100644 --- a/src/App/Pages/Vault/VaultViewCipherPage.cs +++ b/src/App/Pages/Vault/VaultViewCipherPage.cs @@ -247,7 +247,7 @@ namespace Bit.App.Pages NotesCell }; - OtherSection = new TableSection(AppResources.Other) + OtherSection = new TableSection(Helpers.GetEmptyTableSectionTitle()) { revisionDateCell };