From: Jo-Philipp Wich Date: Mon, 15 Jul 2013 13:42:58 +0000 (+0000) Subject: base-files: reject invalid uci keys in network_get_device() and related procedures... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=23b26b06e5d88f4103af65722b4a55747c4f2663;p=openwrt%2Fsvn-archive%2Farchive.git base-files: reject invalid uci keys in network_get_device() and related procedures (#13886) SVN-Revision: 37345 --- diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh index 5ffe2ca0b9..ead69aa626 100644 --- a/package/base-files/files/lib/functions/network.sh +++ b/package/base-files/files/lib/functions/network.sh @@ -25,6 +25,10 @@ __network_parse_ifstatus() local __list local __old_ns + case "$__iface" in + *[^a-zA-Z0-9_]*) return 1 ;; + esac + __network_export __tmp "${__key}__parsed" && return 0 __tmp="$(ubus call network.interface."$__iface" status 2>/dev/null)" [ -n "$__tmp" ] || return 1