1
0
mirror of https://github.com/octoleo/Purse.git synced 2024-06-14 12:12:22 +00:00

Merge pull request #31 from juergenhoetzel/master

Allow shell specia chars in username
This commit is contained in:
drduh 2016-10-04 16:33:36 -04:00 committed by GitHub
commit d14f551e87

6
pwd.sh
View File

@ -74,7 +74,7 @@ read_pass () {
fi fi
if [[ -z "${2+x}" ]] ; then if [[ -z "${2+x}" ]] ; then
read -p " read -r -p "
Username to read? (default: all) " username Username to read? (default: all) " username
else else
username="${2}" username="${2}"
@ -87,7 +87,7 @@ read_pass () {
get_pass " get_pass "
Enter password to unlock ${safe}: " Enter password to unlock ${safe}: "
printf "\n\n" printf "\n\n"
decrypt ${password} ${safe} | grep " ${username}" || fail "Decryption failed" decrypt ${password} ${safe} | grep -F " ${username}" || fail "Decryption failed"
} }
@ -146,7 +146,7 @@ create_username () {
# Create username with password. # Create username with password.
if [[ -z "${2+x}" ]] ; then if [[ -z "${2+x}" ]] ; then
read -p " read -r -p "
Username: " username Username: " username
else else
username="${2}" username="${2}"