From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B8C791F5AE for ; Thu, 30 Jul 2020 05:31:01 +0000 (UTC) Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id C1C5CD2BBF; Thu, 30 Jul 2020 01:30:59 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=sasl; bh=68+DJapQXJUuxNoCGwsgTKTqqEE=; b=C1woWra0rIToKwnOlOqT Hu60xP4amSUha/Y5G2AXREEpVQE3Z/7briPUJLSHe76VeajmqyNO7nhGIfZu9j7w P6ZJfve2RC8/796BSoHkVIEvI1eaJ7jbQou4oz3ul0KedlHUWuRP7WkZwEml7lEL /0+8JWtEUtfatrWplxqpwkk= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id BA6CFD2BBE; Thu, 30 Jul 2020 01:30:59 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:date:message-id:mime-version:content-transfer-encoding; s=mesmtp; bh=YKuhKsJLTfoDQbWH/ZBCX+yNXiweiLMEDJDjTip+O8c=; b=YkyDqyTnBItJDC+ffF1zi82ij/f/nUx8vSH3FlDPIu2mTwVZ4CBiiTCgqBtL5dsrlReoewdvLAbO3IGgIcfmDyTkxaQyjQVL2VCjfXt8BiaG8IrlNUikzJRl2Lr1T6RVdgslWBZxXYSZiXv/DSU61XSY7UCEs4ASIlvsqCfPVmw= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 39E37D2BBD; Thu, 30 Jul 2020 01:30:57 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: meta@public-inbox.org Subject: [PATCH] wwwlisting: fix grep call for match=domain filtering Date: Thu, 30 Jul 2020 01:30:55 -0400 Message-Id: <20200730053055.30972-1-kyle@kyleam.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Pobox-Relay-ID: D849BF26-D225-11EA-8FBF-F0EA2EB3C613-24757444!pb-smtp20.pobox.com Content-Transfer-Encoding: quoted-printable List-Id: 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.p= m 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) =3D @_; my ($list, $hide_key, $re) =3D @$arg; - if (!$ibx->{-hide}->{$hide_key} && grep($re, @{$ibx->{url}})) { + if (!$ibx->{-hide}->{$hide_key} && grep(/$re/, @{$ibx->{url}})) { push @$list, $ibx; } } base-commit: 9e0c2886493863b4bc6483ce0a3bfd3d599c8c87 --=20 2.27.0