sanitize json_get_type function

Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
Luka Perkov 2013-01-04 11:26:08 +01:00 committed by Felix Fietkau
parent 17f4e41ecb
commit f1735cd94e

View file

@ -197,7 +197,7 @@ json_get_type() {
local cur local cur
_json_get_var cur JSON_CUR _json_get_var cur JSON_CUR
local var="${JSON_PREFIX}TYPE_${cur}_$2" local var="${JSON_PREFIX}TYPE_${cur}_${2//[^a-zA-Z0-9_]/_}"
eval "export -- \"$dest=\${$var}\"; [ -n \"\${$var+x}\" ]" eval "export -- \"$dest=\${$var}\"; [ -n \"\${$var+x}\" ]"
} }