@@ -27,7 +27,7 @@ public static function getModuleInfo() {
27
27
'summary ' => __ ('Tracy debugger from Nette with many PW specific custom tools. ' , __FILE__ ),
28
28
'author ' => 'Adrian Jones ' ,
29
29
'href ' => 'https://processwire.com/talk/forum/58-tracy-debugger/ ' ,
30
- 'version ' => '4.26.46 ' ,
30
+ 'version ' => '4.26.47 ' ,
31
31
'autoload ' => 100000 , // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first
32
32
'singular ' => true ,
33
33
'requires ' => 'ProcessWire>=2.7.2, PHP>=5.4.4 ' ,
@@ -216,6 +216,7 @@ static public function getDefaultData() {
216
216
"forceScream " => null ,
217
217
"outputMode " => 'detect ' ,
218
218
"showLocation " => array ('Tracy\Dumper::LOCATION_SOURCE ' , 'Tracy\Dumper::LOCATION_LINK ' , 'Tracy\Dumper::LOCATION_CLASS ' ),
219
+ "keysToHide " => 'dbPass, dbName, dbUser, user, username, pass, password, pwd, pw, auth, token, secret ' ,
219
220
"logSeverity " => array (),
220
221
"excludedPwLogFiles " => array ('session ' , 'modules ' , 'file-compiler ' ),
221
222
"excludedTracyLogFiles " => array (),
@@ -950,6 +951,9 @@ public function init() {
950
951
Debugger::$ showLocation = array_reduce ($ locations , function ($ a , $ b ) { return $ a | $ b ; }, 0 );
951
952
952
953
954
+ Debugger::$ keysToHide = array_map ('trim ' , explode (', ' , $ this ->data ['keysToHide ' ]));
955
+
956
+
953
957
// START ENABLING TRACY
954
958
// now that required classes above have been loaded, we can now exit if user is not allowed
955
959
if (!static ::$ allowedTracyUser ) return ;
@@ -3458,6 +3462,14 @@ public function getModuleConfigInputfields(array $data) {
3458
3462
$ f ->attr ('checked ' , $ data ['debugInfo ' ] == '1 ' ? 'checked ' : '' );
3459
3463
$ fieldset ->add ($ f );
3460
3464
3465
+ $ f = $ this ->wire ('modules ' )->get ("InputfieldText " );
3466
+ $ f ->attr ('name ' , 'keysToHide ' );
3467
+ $ f ->label = __ ('Keys to hide ' , __FILE__ );
3468
+ $ f ->description = __ ('Keys to redact in dumps and bluescreens. ' , __FILE__ );
3469
+ $ f ->notes = __ ('Enter keys separated by commas. ' ."\nDefault: " .self ::getDefaultData ()['keysToHide ' ], __FILE__ );
3470
+ if ($ data ['keysToHide ' ]) $ f ->attr ('value ' , $ data ['keysToHide ' ]);
3471
+ $ fieldset ->add ($ f );
3472
+
3461
3473
$ f = $ this ->wire ('modules ' )->get ("InputfieldInteger " );
3462
3474
$ f ->attr ('name ' , 'maxDepth ' );
3463
3475
$ f ->label = __ ('Maximum nesting depth ' , __FILE__ );
0 commit comments