mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Better fix for escaping in ticket #6371
This commit is contained in:
parent
12563b0cb9
commit
2333d2a482
@ -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");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user