summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-07-15 13:42:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-07-15 13:42:58 +0000
commit55178554c24e9d88a5058bee2ff711d2f291ca53 (patch)
tree600923a1f7372098487b29b6d3eea91f49264476 /package/base-files
parentc404cd5bfa649612604c42f665ac8acfe73c6f27 (diff)
downloadmtk-20170518-55178554c24e9d88a5058bee2ff711d2f291ca53.zip
mtk-20170518-55178554c24e9d88a5058bee2ff711d2f291ca53.tar.gz
mtk-20170518-55178554c24e9d88a5058bee2ff711d2f291ca53.tar.bz2
base-files: reject invalid uci keys in network_get_device() and related procedures (#13886)
SVN-Revision: 37345
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/functions/network.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh
index 5ffe2ca..ead69aa 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