strip out control characters from password name
arĉi arcxi@dismail.de
Sat, 22 Jun 2024 11:03:47 +0200
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
pa
→
pa
@@ -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}"