Second attempt to ix regexp match error when looking for ip/user/uri

in internal caches.
This commit is contained in:
Darold Gilles 2019-03-07 07:52:31 +01:00
parent 28ead4d7e9
commit 5b006411e3
1 changed files with 7 additions and 7 deletions

View File

@ -1056,7 +1056,7 @@ sub check_exclusions
# check for user exclusion
if (exists $self->{Exclude}{users} && $login) {
return 1 if (grep(/^$login$/i, @{ $self->{UserExcludeCache} }));
return 1 if (grep(m#^$login$#i, @{ $self->{UserExcludeCache} }));
foreach my $e (@{$self->{Exclude}{users}}) {
# look for users using the following format: user@domain.tld, domain\user and user
if ( ($login =~ m#^$e$#i) || ($login =~ m#^$e\@#i) || ($login =~ m#\\$e$#i) ) {
@ -1073,7 +1073,7 @@ sub check_exclusions
# check for client exclusion
if (exists $self->{Exclude}{clients} && $client_ip) {
return 1 if (grep(/^$client_ip$/i, @{ $self->{ClientExcludeCache} }));
return 1 if (grep(m#^$client_ip$#i, @{ $self->{ClientExcludeCache} }));
foreach my $e (@{$self->{Exclude}{clients}}) {
if ($client_ip =~ m#^$e$#i) {
push(@{ $self->{ClientExcludeCache} }, $client_ip);
@ -1084,7 +1084,7 @@ sub check_exclusions
# check for Network exclusion
if (exists $self->{Exclude}{networks} && $client_ip) {
return 1 if (grep(/^$client_ip$/, @{ $self->{ClientExcludeCache} }));
return 1 if (grep(m#^$client_ip$#, @{ $self->{ClientExcludeCache} }));
foreach my $e (@{$self->{Exclude}{networks}}) {
if (&check_ip($client_ip, $e)) {
push(@{ $self->{ClientExcludeCache} }, $client_ip);
@ -1095,7 +1095,7 @@ sub check_exclusions
# check for URL exclusion
if (exists $self->{Exclude}{uris} && $url) {
return 1 if (grep(/^$url$/i, @{ $self->{UrlExcludeCache} }));
return 1 if (grep(m#^$url$#i, @{ $self->{UrlExcludeCache} }));
foreach my $e (@{$self->{Exclude}{uris}}) {
if ($url =~ m#^$e$#i) {
push(@{ $self->{UrlExcludeCache} }, $url);
@ -1115,7 +1115,7 @@ sub check_inclusions
# check for user inclusion
if (exists $self->{Include}{users} && $login) {
return 1 if (grep(/^$login$/i, @{ $self->{UserIncludeCache} }));
return 1 if (grep(m#^$login$#i, @{ $self->{UserIncludeCache} }));
foreach my $e (@{$self->{Include}{users}}) {
# look for users using the following format: user@domain.tld, domain\user and user
if ( ($login =~ m#^$e$#i) || ($login =~ m#^$e\@#i) || ($login =~ m#\\$e$#i) ) {
@ -1132,7 +1132,7 @@ sub check_inclusions
# check for client inclusion
if (exists $self->{Include}{clients} && $client_ip) {
return 1 if (grep(/^$client_ip$/i, @{ $self->{ClientIncludeCache} }));
return 1 if (grep(m#^$client_ip$#i, @{ $self->{ClientIncludeCache} }));
foreach my $e (@{$self->{Include}{clients}}) {
if ($client_ip =~ m#^$e$#i) {
push(@{ $self->{ClientIncludeCache} }, $client_ip);
@ -1143,7 +1143,7 @@ sub check_inclusions
# check for Network inclusion
if (exists $self->{Include}{networks} && $client_ip) {
return 1 if (grep(/^$client_ip$/i, @{ $self->{ClientIncludeCache} }));
return 1 if (grep(m#^$client_ip$#i, @{ $self->{ClientIncludeCache} }));
foreach my $e (@{$self->{Include}{networks}}) {
if (&check_ip($client_ip, $e)) {
push(@{ $self->{ClientIncludeCache} }, $client_ip);