From 770f71d75df30429d76018c4277f1c65327f929f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 13 Mar 2018 08:56:24 -0400 Subject: [PATCH] local mask function since encoding issue on jslib --- src/popup/app/vault/vaultViewCipherController.js | 6 +++++- src/popup/app/vault/views/vaultViewCipher.html | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/popup/app/vault/vaultViewCipherController.js b/src/popup/app/vault/vaultViewCipherController.js index 017bb5f0a5..a91ff2e5ba 100644 --- a/src/popup/app/vault/vaultViewCipherController.js +++ b/src/popup/app/vault/vaultViewCipherController.js @@ -21,7 +21,7 @@ angular cipherObj = cipher; return cipher.decrypt(); }).then(function (model) { - $timeout(function() { + $timeout(function () { $scope.cipher = model; if (model.login && model.login.totp && (cipherObj.organizationUseTotp || tokenService.getPremium())) { totpUpdateCode(); @@ -159,6 +159,10 @@ angular return year; }; + $scope.maskValue = function (value) { + return value ? '••••••••' : null; + }; + function totpUpdateCode() { if ($scope.cipher.type !== constantsService.cipherType.login || !$scope.cipher.login.totp) { return; diff --git a/src/popup/app/vault/views/vaultViewCipher.html b/src/popup/app/vault/views/vaultViewCipher.html index fd5f813072..b3470e31cb 100644 --- a/src/popup/app/vault/views/vaultViewCipher.html +++ b/src/popup/app/vault/views/vaultViewCipher.html @@ -45,7 +45,7 @@ {{i18n.password}} - {{cipher.login.maskedPassword}} + {{maskValue(cipher.login.password)}} {{cipher.login.password}}
@@ -219,7 +219,7 @@ {{field.value || ' '}}
- {{field.maskedValue}} + {{maskValue(field.value)}} {{field.value}}