diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-11-08 08:10:24 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-11-26 17:04:48 +0100 |
commit | 3db35394d054cd2c703f14e2fa3db661e8c22b99 (patch) | |
tree | c868f0df7ab878b3c7f27a7259764a67403e6bef /misc/userscripts/password_fill | |
parent | 73ad9247c7b92e82542aa999a96535c76ac064ff (diff) | |
download | qutebrowser-3db35394d054cd2c703f14e2fa3db661e8c22b99.tar.gz qutebrowser-3db35394d054cd2c703f14e2fa3db661e8c22b99.zip |
password_fill: Fix quoting for variable expansions
See https://github.com/koalaman/shellcheck/wiki/SC2295
(cherry picked from commit fa806ad667c37a36323de5effe342364c2e75ddd)
Diffstat (limited to 'misc/userscripts/password_fill')
-rwxr-xr-x | misc/userscripts/password_fill | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/userscripts/password_fill b/misc/userscripts/password_fill index c46253d41..3ea8fd9f6 100755 --- a/misc/userscripts/password_fill +++ b/misc/userscripts/password_fill @@ -241,7 +241,7 @@ pass_backend() { if $GPG "${GPG_OPTS[@]}" -d "$passfile" \ | grep --max-count=1 -iE "${match_line_pattern}${url}" > /dev/null then - passfile="${passfile#$PREFIX}" + passfile="${passfile#"$PREFIX"}" passfile="${passfile#/}" files+=( "${passfile%.gpg}" ) fi @@ -250,7 +250,7 @@ pass_backend() { if ((match_filename)) ; then # add entries with matching filepath while read -r passfile ; do - passfile="${passfile#$PREFIX}" + passfile="${passfile#"$PREFIX"}" passfile="${passfile#/}" files+=( "${passfile%.gpg}" ) done < <(find -L "$PREFIX" -iname '*.gpg' | grep "$url") @@ -267,7 +267,7 @@ pass_backend() { else if [[ $line =~ $user_pattern ]] ; then # remove the matching prefix "user: " from the beginning of the line - username=${line#${BASH_REMATCH[0]}} + username=${line#"${BASH_REMATCH[0]}"} break fi fi |