Commit 0dccde43 authored by Franco Fichtner's avatar Franco Fichtner

inc: more pruning--reading manuals is good

  `If a globalized variable is unset() inside of a function,
   only the local variable is destroyed. The variable in the
   calling environment will retain the same value as before
   unset() was called.'

via http://php.net/manual/en/function.unset.php
parent f4f9e428
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
* NOTE : Portions of the mschapv2 support was based on the BSD licensed CHAP.php * NOTE : Portions of the mschapv2 support was based on the BSD licensed CHAP.php
* file courtesy of Michael Retterklieber. * file courtesy of Michael Retterklieber.
*/ */
if(!$do_not_include_config_gui_inc)
require_once("config.gui.inc"); require_once("config.gui.inc");
// Will be changed to false if security checks fail // Will be changed to false if security checks fail
$security_passed = true; $security_passed = true;
...@@ -44,7 +44,7 @@ $security_passed = true; ...@@ -44,7 +44,7 @@ $security_passed = true;
/* If this function doesn't exist, we're being called from Captive Portal or /* If this function doesn't exist, we're being called from Captive Portal or
another internal subsystem which does not include authgui.inc */ another internal subsystem which does not include authgui.inc */
if (function_exists("display_error_form") && !isset($config['system']['webgui']['nodnsrebindcheck'])) { if (function_exists("display_error_form") && !isset($config['system']['webgui']['nodnsrebindcheck'])) {
/* DNS ReBinding attack prevention. https://redmine.pfsense.org/issues/708 */ /* DNS ReBinding attack prevention */
$found_host = false; $found_host = false;
/* Either a IPv6 address with or without a alternate port */ /* Either a IPv6 address with or without a alternate port */
......
...@@ -349,29 +349,6 @@ function make_config_revision_entry($desc = null, $override_user = null) { ...@@ -349,29 +349,6 @@ function make_config_revision_entry($desc = null, $override_user = null) {
return $revision; return $revision;
} }
function pfSense_clear_globals() {
global $config, $FilterIfList, $GatewaysList, $filterdns, $aliases, $aliastable;
if (isset($FilterIfList))
unset($FilterIfList);
if (isset($GatewaysList))
unset($GatewaysList);
/* Used for the hostname dns resolver */
if (isset($filterdns))
unset($filterdns);
/* Used for aliases and interface macros */
if (isset($aliases))
unset($aliases);
if (isset($aliastable))
unset($aliastable);
unset($config);
}
/** /**
* backup config to google drive and return current file list (/ info) * backup config to google drive and return current file list (/ info)
* *
...@@ -434,5 +411,3 @@ function backup_to_google_drive() { ...@@ -434,5 +411,3 @@ function backup_to_google_drive() {
// not configured / issue, return empty list // not configured / issue, return empty list
return array(); return array();
} }
register_shutdown_function('pfSense_clear_globals');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment