From 41ecd08ee60daa495de3a2fc2c0296dc9cc9a0b3 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 30 Jul 2020 01:30:55 -0400 Subject: wwwlisting: fix grep call for match=domain filtering 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) --- lib/PublicInbox/WwwListing.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- cgit v1.2.3-24-ge0c7