mirror of
https://github.com/openwrt/luci.git
synced 2026-10-12 05:07:26 +04:00
luci-proto-openvpn: fix shell code injection through gerateKey arg
Ensure to quote the `cl_meta` argument of the `gerateKey` procedure. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
1 parent
b45584b4e6
commit
e4ff45ecbc
1 file changed
+1
-1
@@ -68,7 +68,7 @@ const methods = {
|
||||
|
||||
// denote which server key this client key is derived from in the name
|
||||
path = `${mkpath}/${ifname}_${kt}_${ts}-${req.args?.server_key}`;
|
||||
cmd = `${openvpn} --tls-crypt-v2 ${shellquote(server_key)} --genkey tls-crypt-v2-client ${shellquote(path)} ${req.args?.cl_meta} 2>/dev/null`;
|
||||
cmd = `${openvpn} --tls-crypt-v2 ${shellquote(server_key)} --genkey tls-crypt-v2-client ${shellquote(path)} ${shellquote(req.args?.cl_meta)} 2>/dev/null`;
|
||||
} else {
|
||||
// basic genkey
|
||||
cmd = `${openvpn} --genkey ${kt} ${shellquote(path)} 2>/dev/null`;
|
||||
|
||||
Reference in new issue
Block a user