From: Florian Eckert Date: Fri, 3 Feb 2023 08:56:00 +0000 (+0100) Subject: luci-proto-modemmanager: fix acl regex to support more then 9 modem objects X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=71b7ecb7770e11168f02e53b00195c94cee9b28e;p=project%2Fluci.git luci-proto-modemmanager: fix acl regex to support more then 9 modem objects If a modem is restarted often, the modem manager object number is increased by one. Currently, the regex is set so that the modem can no longer be selected if the object number is greater than 9. This change fixes that. Signed-off-by: Florian Eckert [replace wildcard with rule duplication to disallow option injection] Signed-off-by: Jo-Philipp Wich --- diff --git a/protocols/luci-proto-modemmanager/root/usr/share/rpcd/acl.d/luci-proto-modemmanager.json b/protocols/luci-proto-modemmanager/root/usr/share/rpcd/acl.d/luci-proto-modemmanager.json index 716f4c4655..e3d5df7bec 100644 --- a/protocols/luci-proto-modemmanager/root/usr/share/rpcd/acl.d/luci-proto-modemmanager.json +++ b/protocols/luci-proto-modemmanager/root/usr/share/rpcd/acl.d/luci-proto-modemmanager.json @@ -5,7 +5,9 @@ "cgi-io": [ "exec" ], "file": { "/usr/bin/mmcli -L": [ "exec" ], - "/usr/bin/mmcli -m [0-9]": [ "exec" ] + "/usr/bin/mmcli -m [0-9]": [ "exec" ], + "/usr/bin/mmcli -m [0-9][0-9]": [ "exec" ], + "/usr/bin/mmcli -m [0-9][0-9][0-9]": [ "exec" ] } } }