Only allow alphanumeric passphrases for now
We would need to sanitize the input for perl, or find a better way to do hmac_sha256 here.
This commit is contained in:
parent
ca322277b2
commit
124a293a33
|
@ -67,6 +67,7 @@ gocrypt_init() {
|
||||||
if $needs_passphrase; then
|
if $needs_passphrase; then
|
||||||
echo -n "Enter passphrase: "
|
echo -n "Enter passphrase: "
|
||||||
read -s passphrase
|
read -s passphrase
|
||||||
|
[[ "$passphrase" =~ [^a-zA-Z0-9\ ] ]] && gocrypt_die "Only alphanumeric characters are allowed for now"
|
||||||
local passphrase_confirm=""
|
local passphrase_confirm=""
|
||||||
echo
|
echo
|
||||||
echo -n "Confirm passphrase: "
|
echo -n "Confirm passphrase: "
|
||||||
|
|
Loading…
Reference in a new issue