aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-04-30 20:09:03 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-04-30 20:09:03 +0000
commitaaf3faf92a5038a5747d7a8b7af3c0fc7fdebac5 (patch)
tree2671189cca02c29d153d561be6d5e44780c75f0a
parent815446ad81572186b99c31a1d849117e3ddf9835 (diff)
downloadpfsense-packages-aaf3faf92a5038a5747d7a8b7af3c0fc7fdebac5.tar.gz
pfsense-packages-aaf3faf92a5038a5747d7a8b7af3c0fc7fdebac5.tar.bz2
pfsense-packages-aaf3faf92a5038a5747d7a8b7af3c0fc7fdebac5.zip
Fix all button operations.
-rw-r--r--packages/spamd_db.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php
index f8a1f59d..563ed751 100644
--- a/packages/spamd_db.php
+++ b/packages/spamd_db.php
@@ -51,12 +51,12 @@ if($_GET['action'] or $_POST['action']) {
if($_GET['srcip'])
$srcip = escapeshellarg($_GET['srcip']);
if($_POST['srcip'])
- $srcip = escapeshellarg($_POST['srcip']);
+ $srcip = escapeshellarg($_POST['srcip']);
$srcip = str_replace("<","",$srcip);
$srcip = str_replace(">","",$srcip);
$srcip = str_replace(" ","",$srcip);
/* execute spamdb command */
- if($action == "whitelist") {
+ if($action == "'whitelist'") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");
@@ -64,19 +64,19 @@ if($_GET['action'] or $_POST['action']) {
mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt");
exec("echo spamdb -a {$srcip} > /tmp/tmp");
exec("/usr/local/sbin/spamdb -a {$srcip}");
- } else if($action == "delete") {
+ } else if($action == "'delete'") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");
delete_from_blacklist($srcip);
mwexec("/sbin/pfctl -q -t spamd -T delete $srcip");
mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt");
- } else if($action == "spamtrap") {
+ } else if($action == "'spamtrap'") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");
exec("/usr/local/sbin/spamdb -a {$srcip} -T");
- } else if($action == "trapped") {
+ } else if($action == "'trapped'") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");