1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-28 03:57:43 +02:00

Don't leak password length through mask (#293)

This commit is contained in:
Mark Cohen 2018-03-06 06:37:46 -06:00 committed by Kyle Spearrin
parent deb1ead4ea
commit 7c8f6a1cc7

View File

@ -114,7 +114,7 @@ namespace Bit.App.Models.Page
}
}
public string MaskedLoginPassword => RevealLoginPassword ?
LoginPassword : LoginPassword == null ? null : new string('•', LoginPassword.Length);
LoginPassword : LoginPassword == null ? null : new string('•', 8);
public ImageSource LoginShowHideImage => RevealLoginPassword ?
ImageSource.FromFile("eye_slash.png") : ImageSource.FromFile("eye.png");
@ -622,7 +622,7 @@ namespace Bit.App.Models.Page
{
if(_maskedValue == null && Value != null)
{
_maskedValue = new string('•', Value.Length);
_maskedValue = new string('•', 8);
}
return _maskedValue;