From 2eb1127c38349c26687604ebff93e1277df4d093 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Fri, 20 Jun 2014 22:51:38 -0400 Subject: Make sure referer uses local host to avoid sending users to ext sites. --- config/snort/snort_rules_flowbits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/snort/snort_rules_flowbits.php') 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']; -- cgit v1.2.3