From f762d22958102a928a182477848e89413eb4b50b Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Wed, 16 Dec 2020 17:46:55 +0100 Subject: [PATCH] fix: jssjDB path must not contain more than one .. --- modules/jsonDB.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/jsonDB.sh b/modules/jsonDB.sh index 40fe8a3..fe44304 100644 --- a/modules/jsonDB.sh +++ b/modules/jsonDB.sh @@ -5,7 +5,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v1.2-dev2-6-geda77f8 +#### $$VERSION$$ v1.2-dev2-31-g16448a9 # # source from commands.sh to use jsonDB functions # @@ -204,7 +204,7 @@ jssh_checkDB_async() { jssh_checkDB "$@"; } jssh_checkDB(){ local DB [ -z "$1" ] && return 1 - [[ "$1" = *'..'* ]] && return 2 + [[ "$1" = *'../.'* ]] && return 2 if [[ "$1" == "${BASHBOT_VAR:-.}"* ]] || [[ "$1" == "${BASHBOT_DATA:-.}"* ]]; then DB="${1}.jssh" else @@ -296,7 +296,7 @@ jssh_countKeyDB_async() { fi } -# updatie key/value in place to jsshDB +# update key/value in place to jsshDB # $1 key name, can only contain -a-zA-Z0-9,._ # $2 key value # $3 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'