summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_smart.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-05-20 11:33:48 -0400
committerjim-p <jimp@pfsense.org>2016-05-20 11:34:29 -0400
commit5c4b89a468f608be63fc9aa05729e4a7f39ccd58 (patch)
tree113c64a47d0092852643d023f64ec6e52a42a12e /src/usr/local/www/diag_smart.php
parentb991582fa9b2d0c4281fd57b3109ef39fbb45dc5 (diff)
downloadpfsense-5c4b89a468f608be63fc9aa05729e4a7f39ccd58.zip
pfsense-5c4b89a468f608be63fc9aa05729e4a7f39ccd58.tar.gz
Better fix for escaping in ticket #6371
Diffstat (limited to 'src/usr/local/www/diag_smart.php')
-rw-r--r--src/usr/local/www/diag_smart.php2
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");
OpenPOWER on IntegriCloud