Modify WebGUI IP fields to use CIDR format instead of a regular expression.
Multiple IPs are separated by commas, whitespace is ignored. In groups, that affects the ipFilter field, User::isInGroup. In settings, that affects Settings::debugIp and Session::ErrorHandler::canShowDebug. Fixed a bug in WebGUI::Utility::isInSubnet where Net::Subnets->check needs a scalar. Modified t/User.t to use addresses in CIDR format.
This commit is contained in:
parent
c6bc09f79c
commit
cd6759f311
7 changed files with 55 additions and 26 deletions
|
|
@ -192,7 +192,7 @@ sub isInSubnet {
|
|||
}
|
||||
my $net = Net::Subnets->new;
|
||||
$net->subnets($subnets);
|
||||
if ($net->check($ip)) {
|
||||
if ($net->check(\$ip)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue