diff options
author | Aleksander Machniak <alec@alec.pl> | 2017-04-25 09:51:14 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2017-04-25 09:51:57 +0300 |
commit | 06abad4d4e1f584864acd026bdb8794a0c404d09 (patch) | |
tree | d7fc4e8e3510b9316d563b79bb82d8ad1d20a1e6 /plugins | |
parent | 5631de7ec9d3da03a6766d99ff58445664100a60 (diff) |
Password: Fix security issue in virtualmin and sasl drivers
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/password/drivers/sasl.php | 2 | ||||
-rw-r--r-- | plugins/password/drivers/virtualmin.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/password/drivers/sasl.php b/plugins/password/drivers/sasl.php index f3baef557..fcaf7ac3e 100644 --- a/plugins/password/drivers/sasl.php +++ b/plugins/password/drivers/sasl.php @@ -36,7 +36,7 @@ class rcube_sasl_password function save($currpass, $newpass) { $curdir = RCUBE_PLUGINS_DIR . 'password/helpers'; - $username = escapeshellcmd($_SESSION['username']); + $username = escapeshellarg($_SESSION['username']); $args = rcmail::get_instance()->config->get('password_saslpasswd_args', ''); if ($fh = popen("$curdir/chgsaslpasswd -p $args $username", 'w')) { diff --git a/plugins/password/drivers/virtualmin.php b/plugins/password/drivers/virtualmin.php index 3001ad9d0..f219eacc6 100644 --- a/plugins/password/drivers/virtualmin.php +++ b/plugins/password/drivers/virtualmin.php @@ -70,9 +70,9 @@ class rcube_virtualmin_password $domain = $rcmail->user->get_username('domain'); } - $username = escapeshellcmd($username); - $domain = escapeshellcmd($domain); - $newpass = escapeshellcmd($newpass); + $username = escapeshellarg($username); + $domain = escapeshellarg($domain); + $newpass = escapeshellarg($newpass); $curdir = RCUBE_PLUGINS_DIR . 'password/helpers'; exec("$curdir/chgvirtualminpasswd modify-user --domain $domain --user $username --pass $newpass", $output, $returnvalue); |