diff options
author | Renato Botelho <renato@netgate.com> | 2017-05-29 15:20:35 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-05-29 15:20:35 -0300 |
commit | 7c2ca1543c5e0776711ae53e9c3e83224ac592ad (patch) | |
tree | deed43ebc7fc82796bf559ce5afd3ce55a9192dc /src/etc | |
parent | d4d9aa66acb336eb5a8fd1a13e9afbada5758bb0 (diff) | |
parent | ff4e29fb9d048162f0d4d28b0c3e818ed2c1fd8e (diff) | |
download | pfsense-7c2ca1543c5e0776711ae53e9c3e83224ac592ad.zip pfsense-7c2ca1543c5e0776711ae53e9c3e83224ac592ad.tar.gz |
Merge pull request #3740 from stilez/patch-59
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/config.lib.inc | 3 | ||||
-rw-r--r-- | src/etc/inc/globals.inc | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 40c3150..b1174fa 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -908,7 +908,8 @@ function pfSense_clear_globals() { $error = error_get_last(); - if ($error !== NULL) { + // Errors generated by user code (diag_commands.php) are identified by path and not added to notices + if ($error !== NULL && !preg_match('^' . $g['tmp_path_user_code'] . '/[^/]{1,16}$', $error['file'])) { if (in_array($error['type'], array(E_ERROR, E_COMPILE_ERROR, E_CORE_ERROR, E_RECOVERABLE_ERROR))) { $errorstr = "PHP ERROR: Type: {$error['type']}, File: {$error['file']}, Line: {$error['line']}, Message: {$error['message']}"; print($errorstr); diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index 9166421..c4533d8 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -50,6 +50,7 @@ $g = array( "varlog_path" => "/var/log", "etc_path" => "/etc", "tmp_path" => "/tmp", + "tmp_path_user_code" => "/tmp/user_code", "conf_path" => "/conf", "conf_default_path" => "/conf.default", "cf_path" => "/cf", |