diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-07-30 01:30:55 -0400 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-07-30 07:53:30 +0000 |
commit | 41ecd08ee60daa495de3a2fc2c0296dc9cc9a0b3 (patch) | |
tree | 2c683d8b59e666aec1a82810b21906db0ce2b801 /lib/PublicInbox/WwwListing.pm | |
parent | 9e0c2886493863b4bc6483ce0a3bfd3d599c8c87 (diff) | |
download | public-inbox-41ecd08ee60daa495de3a2fc2c0296dc9cc9a0b3.tar.gz |
The grep call in list_match_domain_i returns true for all inboxes, even ones without a URL that matches the regular expression, because the qr value passed to grep is not surrounded by slashes. Add them. Fixes: 1988d730c0088e8b (config: support multi-value inbox.*.*url)
Diffstat (limited to 'lib/PublicInbox/WwwListing.pm')
-rw-r--r-- | lib/PublicInbox/WwwListing.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index 5f85e346..0af0fe68 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -40,7 +40,7 @@ sub list_all ($$$) { sub list_match_domain_i { my ($ibx, $arg) = @_; my ($list, $hide_key, $re) = @$arg; - if (!$ibx->{-hide}->{$hide_key} && grep($re, @{$ibx->{url}})) { + if (!$ibx->{-hide}->{$hide_key} && grep(/$re/, @{$ibx->{url}})) { push @$list, $ibx; } } |