From a1fdc4a9705dfc451a9513166709e2722e92805b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 25 Jan 2019 09:08:13 -0500 Subject: [PATCH] detect hidden field even when toggled --- src/App/Utilities/Helpers.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App/Utilities/Helpers.cs b/src/App/Utilities/Helpers.cs index cfa68b165..b3061c644 100644 --- a/src/App/Utilities/Helpers.cs +++ b/src/App/Utilities/Helpers.cs @@ -341,16 +341,18 @@ namespace Bit.App.Utilities { if(cell is FormEntryCell entryCell) { + var type = entryCell.Entry.IsPassword || entryCell.Button2 != null ? + FieldType.Hidden : FieldType.Text; fields.Add(new Field { Name = string.IsNullOrWhiteSpace(entryCell.Label.Text) ? null : entryCell.Label.Text.Encrypt(cipher.OrganizationId), Value = string.IsNullOrWhiteSpace(entryCell.Entry.Text) ? null : entryCell.Entry.Text.Encrypt(cipher.OrganizationId), - Type = entryCell.Entry.IsPassword ? FieldType.Hidden : FieldType.Text + Type = type }); - if(entryCell.Entry.IsPassword && !string.IsNullOrWhiteSpace(entryCell.Label.Text)) + if(type == FieldType.Hidden && !string.IsNullOrWhiteSpace(entryCell.Label.Text)) { hiddenFieldValues.Add(new Tuple(entryCell.Label.Text, entryCell.Entry.Text));