aboutsummaryrefslogtreecommitdiffstats
path: root/config/pfblockerng/pfblockerng_alerts.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-01-07 17:15:08 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-01-07 17:15:08 -0200
commit1b12d3669d1cb1e0b74943fc6e6fe552f6500b9e (patch)
tree4754bf2cf3a4b653068364bd00c015f972ab457b /config/pfblockerng/pfblockerng_alerts.php
parent22c884d104498547356e6144b6a0c22300085b22 (diff)
parent59b1069b3d591ec03d479ddfbc0638c5e2cdbe0b (diff)
downloadpfsense-packages-1b12d3669d1cb1e0b74943fc6e6fe552f6500b9e.tar.gz
pfsense-packages-1b12d3669d1cb1e0b74943fc6e6fe552f6500b9e.tar.bz2
pfsense-packages-1b12d3669d1cb1e0b74943fc6e6fe552f6500b9e.zip
Merge pull request #766 from BBcan177/pfBlockerNG_1.0
Diffstat (limited to 'config/pfblockerng/pfblockerng_alerts.php')
-rw-r--r--config/pfblockerng/pfblockerng_alerts.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/config/pfblockerng/pfblockerng_alerts.php b/config/pfblockerng/pfblockerng_alerts.php
index 1b54f8f2..541d1e03 100644
--- a/config/pfblockerng/pfblockerng_alerts.php
+++ b/config/pfblockerng/pfblockerng_alerts.php
@@ -143,9 +143,14 @@ if (isset($_POST['addsuppress'])) {
$ip = $_POST['ip'];
$table = $_POST['table'];
$descr = $_POST['descr'];
- if (empty($descr))
- $descr = sprintf(gettext("Entry added %s"), date('r'));
$cidr = $_POST['cidr'];
+
+ // If Description or CIDR field is empty, exit.
+ if (empty($descr) || empty($cidr)) {
+ header("Location: " . $_SERVER['PHP_SELF']);
+ exit;
+ }
+
if (is_ipaddr($ip)) {
$savemsg1 = "Host IP address {$ip}";
@@ -730,8 +735,10 @@ function hostruleid(host,table) {
var description = prompt("Please enter Suppression Description");
document.getElementById("descr").value = description;
- var cidr = prompt("Please enter CIDR [ 32 or 24 CIDR only supported ]","32");
- document.getElementById("cidr").value = cidr;
+ if (description.value != "") {
+ var cidr = prompt("Please enter CIDR [ 32 or 24 CIDR only supported ]","32");
+ document.getElementById("cidr").value = cidr;
+ }
}
// Auto-Resolve of Alerted Hostnames