aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-06-20 22:51:38 -0400
committerRenato Botelho <garga@FreeBSD.org>2014-06-21 11:04:21 -0300
commit2eb1127c38349c26687604ebff93e1277df4d093 (patch)
tree6af91d3141d43e3ac2ded84bf5f8702bfb9a4722 /config/snort
parent31719ee4308524ec59507ff5f82c0eef5e187eba (diff)
downloadpfsense-packages-2eb1127c38349c26687604ebff93e1277df4d093.tar.gz
pfsense-packages-2eb1127c38349c26687604ebff93e1277df4d093.tar.bz2
pfsense-packages-2eb1127c38349c26687604ebff93e1277df4d093.zip
Make sure referer uses local host to avoid sending users to ext sites.
Diffstat (limited to 'config/snort')
-rw-r--r--config/snort/snort_rules_flowbits.php2
-rw-r--r--config/snort/snort_select_alias.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/config/snort/snort_rules_flowbits.php b/config/snort/snort_rules_flowbits.php
index 3baa502c..d7c18a9d 100644
--- a/config/snort/snort_rules_flowbits.php
+++ b/config/snort/snort_rules_flowbits.php
@@ -53,7 +53,7 @@ if (is_null($id)) {
// Set who called us so we can return to the correct page with
// the RETURN ('cancel') button.
-if (isset($_POST['referrer']) && substr($_POST['referrer'], 0, 1) == '/')
+if (isset($_POST['referrer']) && strpos($_POST['referrer'], '://'.$_SERVER['SERVER_NAME'].'/') !== FALSE)
$referrer = $_POST['referrer'];
else
$referrer = $_SERVER['HTTP_REFERER'];
diff --git a/config/snort/snort_select_alias.php b/config/snort/snort_select_alias.php
index e13d0cb4..de504b7f 100644
--- a/config/snort/snort_select_alias.php
+++ b/config/snort/snort_select_alias.php
@@ -61,9 +61,9 @@ if (isset($_POST['multi_ip']))
elseif (isset($_GET['multi_ip']))
$multi_ip = htmlspecialchars($_GET['multi_ip']);
-if (isset($_POST['returl'])) && substr($_POST['returl'], 0, 1) == '/')
+if (isset($_POST['returl']) && substr($_POST['returl'], 0, 1) == '/')
$referrer = urldecode($_POST['returl']);
-elseif (isset($_GET['returl'])) && substr($_GET['returl'], 0, 1) == '/')
+elseif (isset($_GET['returl']) && substr($_GET['returl'], 0, 1) == '/')
$referrer = urldecode($_GET['returl']);
else
$referrer = $_SERVER['HTTP_REFERER'];