mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-10-31 15:42:30 +00:00
revert modules: jsshDB: fix removal of unwanted characters from untrusted input
This commit is contained in:
parent
85f7c074f4
commit
e60ada0bfe
@ -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.51-dev-0-g369124b
|
||||
#### $$VERSION$$ v1.51-dev-3-g85f7c07
|
||||
#
|
||||
# source from commands.sh to use jsonDB functions
|
||||
#
|
||||
@ -358,7 +358,7 @@ Json2Array() {
|
||||
# match ["....."]\t and replace \t with = and print delete ` quote true false escape not escaped $
|
||||
# shellcheck disable=SC1091,SC1090
|
||||
[ -z "$1" ] || source <( printf "$1"'=( %s )'\
|
||||
"$(sed -E -n -e 's/[`´]//g' -e 's/\]\t(true|false)/="\1"/' -e 's/([^\]|^)\$/\1\\$/g' -e '/\["[-0-9a-zA-Z_,."]+"\]\+*\t/ s/\t/=/p')" )
|
||||
"$(sed -E -n -e '/\["[-0-9a-zA-Z_,."]+"\]\+*\t/ s/\t/=/p' -e 's/[`´]//g' -e 's/=(true|false)/="\1"/' -e 's/([^\]|^)\$/\1\\$/g')" )
|
||||
}
|
||||
# get Config Key from jssh file without jsshDB
|
||||
# output ARRAY as JSON.sh style data
|
||||
|
Loading…
Reference in New Issue
Block a user