summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-17 04:35:56 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-17 04:35:56 +0000
commitcfceefc6d97cc17413e37d7d31810f581177fe2b (patch)
tree4e227f536e65abba0e7adcb9d89b6182c6da061e /etc/inc
parent6578832fa9b5b5d3837f465abe03198c6978a9fb (diff)
downloadpfsense-cfceefc6d97cc17413e37d7d31810f581177fe2b.zip
pfsense-cfceefc6d97cc17413e37d7d31810f581177fe2b.tar.gz
Unbreak packages.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/globals.inc2
-rw-r--r--etc/inc/pfsense-utils.inc11
2 files changed, 9 insertions, 4 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index d9c143b..f936fa1 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -51,7 +51,7 @@ $g = array(
"product_name" => "pfSense",
"product_copyright" => "BSD Perimeter LLC",
"product_copyright_years" => "2005, 2006, 2007, 2008",
- "product_website" => "http://www.pfsense.com",
+ "product_website" => "www.pfsense.com",
"product_email" => "coreteam@pfsense.com",
"pppoe_interface" => "ng0",
"n_pptp_units" => 16, /* this value can be overriden in pptp->n_pptp_units */
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index accda0d..5cae4d5 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -61,8 +61,9 @@ function have_natonetooneruleint_access($if) {
* returns true if user has access to edit a specific firewall nat port forward interface
******/
function have_natpfruleint_access($if) {
- global $config, $g, $HTTP_SERVER_VARS;
- $allowed = $g['privs'];
+ global $config, $g, $HTTP_SERVER_VARS, $allowed;
+ if(!$allowed)
+ $allowed = $g['privs'];
if (isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER']))
return true;
$security_url = "firewall_nat_edit.php?if=". strtolower($if);
@@ -2165,6 +2166,8 @@ function make_dirs($path, $mode = 0755) {
* call_pfsense_method(): Call a method exposed by the pfsense.com XMLRPC server.
*/
function call_pfsense_method($method, $params, $timeout = 0) {
+ global $g, $config;
+
$ip = gethostbyname($g['product_website']);
if($ip == $g['product_website'])
return false;
@@ -2253,7 +2256,9 @@ function display_top_tabs(& $tab_array) {
if ((strpos($link, "pkg.php")) !== false || (strpos($link, "pkg_edit.php")) !== false) {
$pos_equal = strpos($link, "=");
$pos_xmlsuffix = strpos($link, ".xml");
- $link = substr($link, $pos_equal +1, ($pos_xmlsuffix - $pos_equal +3));
+ /* do we match an absolute url including ?xml= foo */
+ if(!in_array($link, $allowed))
+ $link = substr($link, $pos_equal +1, ($pos_xmlsuffix - $pos_equal +3));
}
// next check - what if the basename contains a query string?
if ((strpos($link, "?")) !== false) {
OpenPOWER on IntegriCloud