From 6048cbcf1b2e2029250f9eb5fe166627c89398fd Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 19 Jun 2014 15:04:39 -0300 Subject: Improve a bit user input parameters, also make sure referer starts with / to avoid sending users to external 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 daf1c4ef..3baa502c 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 ($_POST['referrer']) +if (isset($_POST['referrer']) && substr($_POST['referrer'], 0, 1) == '/') $referrer = $_POST['referrer']; else $referrer = $_SERVER['HTTP_REFERER']; -- cgit v1.2.3