summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-12-03 02:31:59 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-12-03 02:31:59 +0000
commit3cc8dccb698e6fd78653cf2b493c29f836547ff8 (patch)
treea6f1b63db5a96842e8702cbbc067ec4f9a1e1c7f
parentb67429270b6619e88242bc82bd424332f453c684 (diff)
downloadpfsense-3cc8dccb698e6fd78653cf2b493c29f836547ff8.zip
pfsense-3cc8dccb698e6fd78653cf2b493c29f836547ff8.tar.gz
When showing the firewall rules page without a interface default to the first interface the user has access to.
-rwxr-xr-xusr/local/www/firewall_rules.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 9bc388e..01dcc41 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -69,14 +69,15 @@ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']
$iflist["enc0"] = "IPSEC";
if (!$if || !isset($iflist[$if]))
- $if = "wan";
+ foreach($iflist as $if => $ifname)
+ break;
$security_url = "firewall_rules.php?if=". strtolower($if);
if (!isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])) {
if(!in_array($security_url, $allowed)) {
// User does not have access
// echo "displaying error {$security_url}"; print_r($allowed);
- echo display_error_form("401", "Unauthorized. You do not have access to the page {$pagereq}");
+ echo display_error_form("401", "Unauthorized. You do not have access to the page {$pagereq} for interface {$if}");
exit;
}
}
OpenPOWER on IntegriCloud