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;