small pixel drawing of a pufferfish pa

strip out control characters from password name
arĉi arcxi@dismail.de
Sat, 22 Jun 2024 11:03:47 +0200
commit

527b9b8f52030c5eb45d42abaac49175395e4850

parent

52ab7d0c5cd11a92b953155860451aee9aba9cba

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M papa

@@ -210,8 +210,12 @@ age_keygen=$(command -v age-keygen || command -v rage-keygen) ||

die "age-keygen not found, install per https://age-encryption.org" command=$1 + + # Combine the rest of positional arguments into + # a name and remove control characters from it + # so that a name can always be safely displayed. shift - name="$*" + name=$(printf %s "$*" | LC_ALL=C tr -d '[:cntrl:]') basedir="${XDG_DATA_HOME:=$HOME/.local/share}/pa" : "${PA_DIR:=$basedir/passwords}"