From 7df415613e695da85fc7eec5dd6557c01003dfef Mon Sep 17 00:00:00 2001 From: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> Date: Thu, 14 Apr 2022 15:27:46 -0500 Subject: [PATCH] UI: Masked inputs always look the same when value is hidden (#15025) (#15034) * Masked inputs always look the same when value is hidden * Add changelog * Fix failing test --- changelog/15025.txt | 3 + .../templates/components/masked-input.hbs | 12 +- .../secrets/backend/kv/secret-test.js | 107 +++++++----------- .../components/masked-input-test.js | 28 ++--- 4 files changed, 69 insertions(+), 81 deletions(-) create mode 100644 changelog/15025.txt diff --git a/changelog/15025.txt b/changelog/15025.txt new file mode 100644 index 000000000000..fd69733865ba --- /dev/null +++ b/changelog/15025.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: masked values no longer give away length or location of special characters +``` diff --git a/ui/lib/core/addon/templates/components/masked-input.hbs b/ui/lib/core/addon/templates/components/masked-input.hbs index 50dee850d223..301cf91da53d 100644 --- a/ui/lib/core/addon/templates/components/masked-input.hbs +++ b/ui/lib/core/addon/templates/components/masked-input.hbs @@ -2,7 +2,11 @@
{{#if displayOnly}} -
{{unless showValue (truncate value 20) value}}
+ {{#if showValue}} +
{{value}}
+ {{else}} +
***********
+ {{/if}} {{else if inputField}} {{else}} -