summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-02 22:47:43 -0500
committersullrich <sullrich@pfsense.org>2009-12-02 22:47:43 -0500
commit53b305053dc26097bac64728521ccdf57e355f15 (patch)
tree87f301d029e87cc312cba1291d3a0d6982781fc7 /etc
parent953ab2d47bc2da80d6aae5992ebf74022322c7b1 (diff)
downloadpfsense-53b305053dc26097bac64728521ccdf57e355f15.zip
pfsense-53b305053dc26097bac64728521ccdf57e355f15.tar.gz
Set 2nd parameter for isAllowedPage. Will be required for #34, 33, 32
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/authgui.inc2
-rw-r--r--etc/inc/pfsense-utils.inc2
-rw-r--r--etc/inc/priv.inc2
3 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index 5332582..686bd53 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -81,7 +81,7 @@ $allowedpages = getAllowedPages($HTTP_SERVER_VARS['AUTH_USER']);
/*
* redirect to first allowed page if requesting a wrong url
*/
-if (!isAllowedPage($_SERVER['SCRIPT_NAME'])) {
+if (!isAllowedPage($_SERVER['SCRIPT_NAME'], $_SESSION['Username'])) {
if (count($allowedpages) > 0) {
$page = str_replace('*', '', $allowedpages[0]);
$_SESSION['Post_Login'] = true;
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index b6e7f17..90b81f3 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -50,7 +50,7 @@
******/
function have_natonetooneruleint_access($if) {
$security_url = "firewall_nat_1to1_edit.php?if=". strtolower($if);
- if(isAllowedPage($security_url, $allowed))
+ if(isAllowedPage($security_url, $_SESSION['Username']))
return true;
return false;
}
diff --git a/etc/inc/priv.inc b/etc/inc/priv.inc
index 9913c4e..3d5adb3 100644
--- a/etc/inc/priv.inc
+++ b/etc/inc/priv.inc
@@ -175,7 +175,7 @@ function get_user_privdesc(& $user) {
return $privs;
}
-function isAllowedPage($page, $username = "") {
+function isAllowedPage($page, $username) {
global $_SESSION;
if($username == "")
OpenPOWER on IntegriCloud