From 5d9c0c083035099cf0863b7ae598a3c6077dd224 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 27 Dec 2019 22:52:59 +0000 Subject: [PATCH] sekrit: make check_key more strict --- bin/sekrit.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()