aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-03-19 23:40:27 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-03-19 23:40:27 +0000
commitd9100d29361bffdf41e25d02b09a3fc510aeafac (patch)
tree35e473bca160995a20c18a4639e3ed276ac41e63 /packages
parentacf6e210aee3b3079d5ecdf1c3be7303c4ea4ecd (diff)
downloadpfsense-packages-d9100d29361bffdf41e25d02b09a3fc510aeafac.tar.gz
pfsense-packages-d9100d29361bffdf41e25d02b09a3fc510aeafac.tar.bz2
pfsense-packages-d9100d29361bffdf41e25d02b09a3fc510aeafac.zip
Delete items correctly when they are an ip address
Diffstat (limited to 'packages')
-rw-r--r--packages/spamd_db.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php
index fe54e7ae..25ef4ab3 100644
--- a/packages/spamd_db.php
+++ b/packages/spamd_db.php
@@ -52,14 +52,17 @@ if($_GET['action'] or $_POST['action']) {
$srcip = $_GET['srcip'];
if($_POST['srcip'])
$srcip = $_POST['srcip'];
+ $srcip = str_replace("<","",$srcip);
+ $srcip = str_replace(">","",$srcip);
+ $srcip = str_replace(" ","",$srcip);
/* execute spamdb command */
if($action == "whitelist") {
exec("echo spamdb -a {$srcip} > /tmp/tmp");
exec("/usr/local/sbin/spamdb -a {$srcip}");
} else if($action == "delete") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
- exec("/usr/local/sbin/spamdb -d -T \"<{$srcip}>\"");
- exec("/usr/local/sbin/spamdb -d -t \"<{$srcip}>\"");
+ exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -T");
+ exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -t");
} else if($action == "spamtrap") {
exec("/usr/local/sbin/spamdb -a {$srcip} -T");
} else if($action == "trapped") {