mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
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
This commit is contained in:
parent
f4f9e42888
commit
0dccde43ba
@ -35,8 +35,8 @@
|
||||
* NOTE : Portions of the mschapv2 support was based on the BSD licensed CHAP.php
|
||||
* 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
|
||||
$security_passed = true;
|
||||
@ -44,7 +44,7 @@ $security_passed = true;
|
||||
/* If this function doesn't exist, we're being called from Captive Portal or
|
||||
another internal subsystem which does not include authgui.inc */
|
||||
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;
|
||||
|
||||
/* Either a IPv6 address with or without a alternate port */
|
||||
|
||||
@ -349,29 +349,6 @@ function make_config_revision_entry($desc = null, $override_user = null) {
|
||||
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)
|
||||
*
|
||||
@ -434,5 +411,3 @@ function backup_to_google_drive() {
|
||||
// not configured / issue, return empty list
|
||||
return array();
|
||||
}
|
||||
|
||||
register_shutdown_function('pfSense_clear_globals');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user