diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 1e8c1f3a9..bec8a5780 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -37,10 +37,12 @@ "dashboard". You can create more than one dashboard per site. See the help documention for how to use Shortcut overrides and the new user preference fields. -- [ 1361669 ] editUserProfileField causes huge memory consumption, loop -- [ 1354464 ] Dynamic Field does not work correctly -- [ 1354467 ] WebGUI::Form::Group is implemented incorrectly -- [ 1372045 ] Required user profile field not show when create login + - [ 1361669 ] editUserProfileField causes huge memory consumption, loop + - [ 1354464 ] Dynamic Field does not work correctly + - [ 1354467 ] WebGUI::Form::Group is implemented incorrectly + - [ 1372045 ] Required user profile field not show when create login + - Added an option for multiple IP addresses (space seperated) for debug + output 6.7.8 diff --git a/lib/WebGUI/ErrorHandler.pm b/lib/WebGUI/ErrorHandler.pm index c38a2aef2..d2967eaf9 100644 --- a/lib/WebGUI/ErrorHandler.pm +++ b/lib/WebGUI/ErrorHandler.pm @@ -87,14 +87,17 @@ Returns true if the user meets the condition to see debugging information and de =cut sub canShowDebug { - return ( - ( - $WebGUI::Session::session{setting}{showDebug} - ) && ( - $WebGUI::Session::session{env}{REMOTE_ADDR} =~ /^$WebGUI::Session::session{setting}{debugIp}/ || - $WebGUI::Session::session{setting}{debugIp} eq "" - ) - ); + return 0 unless ($WebGUI::Session::session{setting}{showDebug}); + return 1 if ($WebGUI::Session::session{setting}{debugIp} eq ""); + my @ips = split(" ",$WebGUI::Session::session{setting}{debugIp}); + my $ok = 0; + foreach my $ip (@ips) { + if ($WebGUI::Session::session{env}{REMOTE_ADDR} =~ /^$ip/) { + $ok = 1; + last; + } + } + return $ok; } #-------------------------------------------------------------------