From f6e4a874574baadd43e9bf8341167e2d81c2b35b Mon Sep 17 00:00:00 2001 From: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:56:39 -0500 Subject: [PATCH] UI: Masked inputs always look the same when value is hidden (#15025) * Masked inputs always look the same when value is hidden * Add changelog * Fix failing test --- changelog/15025.txt | 3 +++ .../core/addon/templates/components/masked-input.hbs | 10 +++++----- ui/tests/acceptance/secrets/backend/kv/secret-test.js | 2 +- ui/tests/integration/components/masked-input-test.js | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 changelog/15025.txt diff --git a/changelog/15025.txt b/changelog/15025.txt new file mode 100644 index 000000000..fd6973386 --- /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 70aba28a8..eb21d6ad5 100644 --- a/ui/lib/core/addon/templates/components/masked-input.hbs +++ b/ui/lib/core/addon/templates/components/masked-input.hbs @@ -4,11 +4,11 @@ data-test-field > {{#if this.displayOnly}} -
{{unless - this.showValue - (truncate this.value 20) - this.value - }}+ {{#if this.showValue}} +
{{this.value}}+ {{else}} +
***********+ {{/if}} {{else if this.inputField}}