diff options
author | jim-p <jimp@pfsense.org> | 2016-05-20 11:33:48 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2016-05-20 11:33:48 -0400 |
commit | 2333d2a48293d4d5ffab335d1904586c69a050ee (patch) | |
tree | 100bc47d07c4ddc0ef9da18738b0c86026547175 | |
parent | 12563b0cb9496cce317f563a60cd7afcba2afd7a (diff) | |
download | pfsense-2333d2a48293d4d5ffab335d1904586c69a050ee.zip pfsense-2333d2a48293d4d5ffab335d1904586c69a050ee.tar.gz |
Better fix for escaping in ticket #6371
-rw-r--r-- | src/usr/local/www/diag_smart.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usr/local/www/diag_smart.php b/src/usr/local/www/diag_smart.php index 9b6bfd4..e7be8de 100644 --- a/src/usr/local/www/diag_smart.php +++ b/src/usr/local/www/diag_smart.php @@ -111,7 +111,7 @@ function update_email($email) { // Did they pass an email? if (!empty($email)) { // Put it in the smartd.conf file - shell_exec("/usr/bin/sed -i .old 's/^DEVICESCAN.*/DEVICESCAN -H -m " . escapeshellarg(str_replace('`', '', $email)) . "/' /usr/local/etc/smartd.conf"); + shell_exec("/usr/bin/sed -i .old " . escapeshellarg("s/^DEVICESCAN.*/DEVICESCAN -H -m {$email}/") . " /usr/local/etc/smartd.conf"); } else { // Remove email flags in smartd.conf shell_exec("/usr/bin/sed -i .old 's/^DEVICESCAN.*/DEVICESCAN/' /usr/local/etc/smartd.conf"); |