mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
detect hidden field even when toggled
This commit is contained in:
parent
d20b3cadbf
commit
a1fdc4a970
1 changed files with 4 additions and 2 deletions
|
@ -341,16 +341,18 @@ namespace Bit.App.Utilities
|
||||||
{
|
{
|
||||||
if(cell is FormEntryCell entryCell)
|
if(cell is FormEntryCell entryCell)
|
||||||
{
|
{
|
||||||
|
var type = entryCell.Entry.IsPassword || entryCell.Button2 != null ?
|
||||||
|
FieldType.Hidden : FieldType.Text;
|
||||||
fields.Add(new Field
|
fields.Add(new Field
|
||||||
{
|
{
|
||||||
Name = string.IsNullOrWhiteSpace(entryCell.Label.Text) ? null :
|
Name = string.IsNullOrWhiteSpace(entryCell.Label.Text) ? null :
|
||||||
entryCell.Label.Text.Encrypt(cipher.OrganizationId),
|
entryCell.Label.Text.Encrypt(cipher.OrganizationId),
|
||||||
Value = string.IsNullOrWhiteSpace(entryCell.Entry.Text) ? null :
|
Value = string.IsNullOrWhiteSpace(entryCell.Entry.Text) ? null :
|
||||||
entryCell.Entry.Text.Encrypt(cipher.OrganizationId),
|
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<string, string>(entryCell.Label.Text,
|
hiddenFieldValues.Add(new Tuple<string, string>(entryCell.Label.Text,
|
||||||
entryCell.Entry.Text));
|
entryCell.Entry.Text));
|
||||||
|
|
Loading…
Reference in a new issue