diff options
| author | Fredrick Brennan <admin@8chan.co> | 2014-05-19 13:39:30 -0400 |
|---|---|---|
| committer | Fredrick Brennan <admin@8chan.co> | 2014-05-19 13:39:30 -0400 |
| commit | ff809ccf71ac6e353faec3095bb193c5d49611bb (patch) | |
| tree | 06eca738f157c8c377fb4f674a911e381b8b50fd | |
| parent | 101202a031541728e59a5bfe39c489416748b095 (diff) | |
SECURITY: Remove $config[db][password] when $config[debug] is TRUE
| -rw-r--r-- | inc/display.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/inc/display.php b/inc/display.php index c836247e..bfc8eeea 100644 --- a/inc/display.php +++ b/inc/display.php @@ -109,6 +109,18 @@ function error($message, $priority = true, $debug_stuff = false) { ))); } + $pw = $config['db']['password']; + $debug_callback = function(&$item) use (&$debug_callback, $pw) { + global $config; + if (is_array($item)) { + $item = array_filter($item, $debug_callback); + } + return ($item !== $pw || !$pw); + }; + + + $debug_stuff = array_filter($debug_stuff, $debug_callback); + die(Element('page.html', array( 'config' => $config, 'title' => _('Error'), |
