diff --git a/bin/sekrit.sh b/bin/sekrit.sh index 9a2f192..1a144bc 100644 --- a/bin/sekrit.sh +++ b/bin/sekrit.sh @@ -48,7 +48,11 @@ err() check_key() { - [ "$1" = "${1%/}" ] || err "Key can not end in a slash." + case $1 in + */ | /* | ./* | */./* | */. | ../* | */../* | */..) + err "Key can not end in a slash." + ;; + esac } to_number()