diff --git a/src/App/Pages/Vault/VaultEditLoginPage.cs b/src/App/Pages/Vault/VaultEditLoginPage.cs index 46bbd3dc2..f83e1e609 100644 --- a/src/App/Pages/Vault/VaultEditLoginPage.cs +++ b/src/App/Pages/Vault/VaultEditLoginPage.cs @@ -159,11 +159,11 @@ namespace Bit.App.Pages return; } - login.Uri = UriCell.Entry.Text?.Encrypt(); - login.Name = NameCell.Entry.Text?.Encrypt(); - login.Username = UsernameCell.Entry.Text?.Encrypt(); - login.Password = PasswordCell.Entry.Text?.Encrypt(); - login.Notes = NotesCell.Editor.Text?.Encrypt(); + login.Uri = UriCell.Entry.Text?.Encrypt(login.OrganizationId); + login.Name = NameCell.Entry.Text?.Encrypt(login.OrganizationId); + login.Username = UsernameCell.Entry.Text?.Encrypt(login.OrganizationId); + login.Password = PasswordCell.Entry.Text?.Encrypt(login.OrganizationId); + login.Notes = NotesCell.Editor.Text?.Encrypt(login.OrganizationId); login.Favorite = favoriteCell.On; if(FolderCell.Picker.SelectedIndex > 0) diff --git a/src/App/Utilities/Extentions.cs b/src/App/Utilities/Extentions.cs index d498c94f2..059dc3d4a 100644 --- a/src/App/Utilities/Extentions.cs +++ b/src/App/Utilities/Extentions.cs @@ -10,7 +10,7 @@ namespace Bit.App { public static class Extentions { - public static CipherString Encrypt(this string s) + public static CipherString Encrypt(this string s, string orgId = null) { if(s == null) { @@ -18,6 +18,12 @@ namespace Bit.App } var cryptoService = Resolver.Resolve(); + + if(!string.IsNullOrWhiteSpace(orgId)) + { + return cryptoService.Encrypt(s, cryptoService.GetOrgKey(orgId)); + } + return cryptoService.Encrypt(s); }