diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2013-06-01 17:47:58 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2013-06-01 17:47:58 -0400 |
commit | 9202d4eee77550b77d0c4828e95fdd077dd35dc1 (patch) | |
tree | d93e5503b36e85dd63a9281f6be7f7b0486138f4 | |
parent | 29f2bf96b8adcd91d20d96be182ac0911264da69 (diff) | |
download | pfsense-packages-9202d4eee77550b77d0c4828e95fdd077dd35dc1.tar.gz pfsense-packages-9202d4eee77550b77d0c4828e95fdd077dd35dc1.tar.bz2 pfsense-packages-9202d4eee77550b77d0c4828e95fdd077dd35dc1.zip |
Add HTML markup to wrap IPv6 address in Alert and Blocked tabs.
-rwxr-xr-x | config/snort/snort_alerts.php | 4 | ||||
-rw-r--r-- | config/snort/snort_blocked.php | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php index 607fba54..8c42fa89 100755 --- a/config/snort/snort_alerts.php +++ b/config/snort/snort_alerts.php @@ -305,6 +305,8 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) { $alert_proto = $fields[5]; /* IP SRC */ $alert_ip_src = $fields[6]; + /* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */ + $alert_ip_src = str_replace(":", ":​", $alert_ip_src); if (isset($tmpblocked[$fields[6]])) { $alert_ip_src .= "<br/><a href='?instance={$id}&todelete=" . trim(urlencode($fields[6])) . "'> <img title=\"" . gettext("Remove host from Blocked Table") . "\" border=\"0\" width='10' height='10' name='todelete' id='todelete' alt=\"Remove from Blocked Hosts\" src=\"../themes/{$g['theme']}/images/icons/icon_x.gif\"/></a>"; @@ -313,6 +315,8 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) { $alert_src_p = $fields[7]; /* IP Destination */ $alert_ip_dst = $fields[8]; + /* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */ + $alert_ip_dst = str_replace(":", ":​", $alert_ip_dst); if (isset($tmpblocked[$fields[8]])) { $alert_ip_dst .= "<br/><a href='?instance={$id}&todelete=" . trim(urlencode($fields[8])) . "'> <img title=\"" . gettext("Remove host from Blocked Table") . "\" border=\"0\" width='10' height='10' name='todelete' id='todelete' alt=\"Remove from Blocked Hosts\" src=\"../themes/{$g['theme']}/images/icons/icon_x.gif\"/></a>"; diff --git a/config/snort/snort_blocked.php b/config/snort/snort_blocked.php index 5fb7e608..43b351ab 100644 --- a/config/snort/snort_blocked.php +++ b/config/snort/snort_blocked.php @@ -249,10 +249,13 @@ if ($pconfig['brefresh'] == 'on') else $counter++; + /* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */ + $tmp_ip = str_replace(":", ":​", $blocked_ip); + /* use one echo to do the magic*/ echo "<tr> <td align=\"center\" valign=\"middle\" class=\"listr\">{$counter}</td> - <td valign=\"middle\" class=\"listr\">{$blocked_ip}</td> + <td valign=\"middle\" class=\"listr\">{$tmp_ip}</td> <td valign=\"middle\" class=\"listr\">{$blocked_desc}</td> <td align=\"center\" valign=\"middle\" class=\"listr\"><a href='snort_blocked.php?todelete=" . trim(urlencode($blocked_ip)) . "'> <img title=\"" . gettext("Delete host from Blocked Table") . "\" border=\"0\" name='todelete' id='todelete' alt=\"Delete host from Blocked Table\" src=\"../themes/{$g['theme']}/images/icons/icon_x.gif\"></a></td> |