|
|
@@ -836,7 +836,7 @@ if (defined $hostname and $hostname) {
|
|
|
if (defined $ip and $ip) {
|
|
|
my $users = new Net::Patricia;
|
|
|
#check ip rules
|
|
|
- @ip_rules = get_records_sql($db,'SELECT * FROM auth_rules WHERE type=1 and LENGTH(rule)>0 AND ou_id IS NOT NULL');
|
|
|
+ my @ip_rules = get_records_sql($db,'SELECT * FROM auth_rules WHERE type=1 and LENGTH(rule)>0 AND ou_id IS NOT NULL');
|
|
|
foreach my $row (@ip_rules) { eval { $users->add_string($row->{rule},$row->{ou_id}); }; }
|
|
|
if ($users->match_string($ip)) { $result->{ou_id}=$users->match_string($ip); return $result; }
|
|
|
}
|