From 35b75b9b94a3f63c358c34fe98ee5ad7f7004a62 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 19 Jun 2014 17:01:59 -0300 Subject: Replicate last snort changes from 6048cbcf1 to suricata --- config/suricata/suricata_rules_flowbits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/suricata/suricata_rules_flowbits.php') diff --git a/config/suricata/suricata_rules_flowbits.php b/config/suricata/suricata_rules_flowbits.php index c5193a8b..f266875c 100644 --- a/config/suricata/suricata_rules_flowbits.php +++ b/config/suricata/suricata_rules_flowbits.php @@ -65,7 +65,7 @@ if (is_null($id)) { // Set who called us so we can return to the correct page with // the RETURN ('cancel') button. -if ($_POST['referrer']) +if ($_POST['referrer'] && substr($_POST['referrer'], 0, 1) == '/') $referrer = $_POST['referrer']; else $referrer = $_SERVER['HTTP_REFERER']; -- cgit v1.2.3 From 79de69da2668af481a1d11b8ec6e2a6c340190cc Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Sat, 21 Jun 2014 11:15:29 -0300 Subject: Make sure referer uses local host to avoid sending users to ext sites. --- config/suricata/suricata_rules_flowbits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/suricata/suricata_rules_flowbits.php') diff --git a/config/suricata/suricata_rules_flowbits.php b/config/suricata/suricata_rules_flowbits.php index f266875c..8d0fd5d3 100644 --- a/config/suricata/suricata_rules_flowbits.php +++ b/config/suricata/suricata_rules_flowbits.php @@ -65,7 +65,7 @@ if (is_null($id)) { // Set who called us so we can return to the correct page with // the RETURN ('cancel') button. -if ($_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