Use fixed strings for searching the password safe

Instead of passing the username as regular expression. This allows
matching usernames which contain regex syntax characters like
DOMAIN\user.
This commit is contained in:
Juergen Hoetzel 2016-10-04 18:00:00 +02:00
parent b2ac781092
commit 43a34d303b
1 changed files with 1 additions and 1 deletions

2
pwd.sh
View File

@ -87,7 +87,7 @@ read_pass () {
get_pass "
Enter password to unlock ${safe}: "
printf "\n\n"
decrypt ${password} ${safe} | grep " ${username}" || fail "Decryption failed"
decrypt ${password} ${safe} | grep -F " ${username}" || fail "Decryption failed"
}