Fix bug with include/exclude networks or clients preventing users reports to be built. Thanks to Juan Martin for the report.
This commit is contained in:
parent
300f820424
commit
b6774c366c
|
@ -978,7 +978,7 @@ sub check_exclusions
|
|||
|
||||
# check for Network exclusion
|
||||
if (exists $self->{Exclude}{networks} && $client_ip) {
|
||||
foreach my $e (@{$self->{Exclude}{networks}}) {
|
||||
foreach my $e (@{$self->{Include}{networks}}) {
|
||||
if (&check_ip($client_ip, $e)) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -1013,6 +1013,11 @@ sub check_inclusions
|
|||
}
|
||||
}
|
||||
|
||||
# If login is a client ip, checked login against clients and networks filters
|
||||
if (!$client_ip && ($login =~ /^\d+\.\d+\.\d+\.\d+$/)) {
|
||||
$client_ip = $login;
|
||||
}
|
||||
|
||||
# check for client inclusion
|
||||
if (exists $self->{Include}{clients} && $client_ip) {
|
||||
foreach my $e (@{$self->{Include}{clients}}) {
|
||||
|
@ -1878,7 +1883,6 @@ sub _append_stat
|
|||
$path =~ s/[\/]+$//;
|
||||
|
||||
print STDERR "Appending data into $self->{Output}/$path\n" if (!$self->{QuietMode});
|
||||
|
||||
|
||||
#### Save cache statistics
|
||||
my $dat_file_code = new IO::File;
|
||||
|
@ -2266,7 +2270,10 @@ sub _read_stat
|
|||
my $lsize = $5 || 0;
|
||||
my $lurl = $6 || 0;
|
||||
|
||||
next if (!$self->check_inclusions($id));
|
||||
if ($self->{rebuild}) {
|
||||
next if (!$self->check_inclusions($id));
|
||||
next if ($self->check_exclusions($id));
|
||||
}
|
||||
|
||||
# Anonymize all users
|
||||
if ($self->{AnonymizeLogin} && ($id !~ /^Anon[a-zA-Z0-9]{16}$/)) {
|
||||
|
|
Loading…
Reference in New Issue