From 7c8f6a1cc79a3908fc60489716ef08700ec8cf07 Mon Sep 17 00:00:00 2001 From: Mark Cohen Date: Tue, 6 Mar 2018 06:37:46 -0600 Subject: [PATCH] Don't leak password length through mask (#293) --- src/App/Models/Page/VaultViewCipherPageModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/Models/Page/VaultViewCipherPageModel.cs b/src/App/Models/Page/VaultViewCipherPageModel.cs index 445ef31fe..03dd392e3 100644 --- a/src/App/Models/Page/VaultViewCipherPageModel.cs +++ b/src/App/Models/Page/VaultViewCipherPageModel.cs @@ -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;