[Patchew-devel] [PATCH] import: Fix mailing list matching

Fam Zheng posted 1 patch 3 months ago
api/models.py                                   |   6 +++++-
mbox.py                                         |   2 ++
tests/data/0036-patch-with-no-to-header.mbox.gz | Bin 0 -> 4783 bytes
tests/test_import.py                            |  11 +++++++++++
4 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 tests/data/0036-patch-with-no-to-header.mbox.gz
[Patchew-devel] [PATCH] import: Fix mailing list matching
Posted by Fam Zheng 3 months ago
If the mbox has no To: field, we have an empty addr in the returned
address list. This is later used in Project.recognizes() as:

    if addr in self.mailing_list:
        ...

Remove the empty result.

Also preprocess the mailing_list before matching.

Reported-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Fam Zheng <fam.zheng@bytedance.com>
---
 api/models.py                                   |   6 +++++-
 mbox.py                                         |   2 ++
 tests/data/0036-patch-with-no-to-header.mbox.gz | Bin 0 -> 4783 bytes
 tests/test_import.py                            |  11 +++++++++++
 4 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/0036-patch-with-no-to-header.mbox.gz

diff --git a/api/models.py b/api/models.py
index 5879466..18392b1 100644
--- a/api/models.py
+++ b/api/models.py
@@ -265,11 +265,15 @@ class Project(models.Model):
             return True
         return False
 
+    def get_mailing_lists(self):
+        r = self.mailing_list.split()
+        return [x.rstrip(',;') for x in r]
+
     def recognizes(self, m):
         """Test if @m is considered a message in this project"""
         addr_ok = False
         for name, addr in m.get_to() + m.get_cc():
-            if addr in self.mailing_list:
+            if addr in self.get_mailing_lists():
                 addr_ok = True
                 break
         if addr_ok:
diff --git a/mbox.py b/mbox.py
index 20abca1..bcd3600 100644
--- a/mbox.py
+++ b/mbox.py
@@ -115,6 +115,8 @@ class MboxMessage(object):
         addrs = email.utils.getaddresses(f)
         for name, addr in addrs:
             name = name or addr
+            if not addr:
+                continue
             if text:
                 ret.append(_addr_fmt_text(name, addr))
             else:
diff --git a/tests/data/0036-patch-with-no-to-header.mbox.gz b/tests/data/0036-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Au
z^!}SU;@0jomp|(JDsu0<HycdJ+X;nzxnJByV+gSr&xOL#<#b5K8HT)A6}(8C|1TZ)
JuGBa;006i%C-VRR

literal 0
HcmV?d00001

diff --git a/tests/test_import.py b/tests/test_import.py
index af7830b..ec1ebc4 100755
--- a/tests/test_import.py
+++ b/tests/test_import.py
@@ -86,6 +86,17 @@ class ImportTest(PatchewTestCase):
         )
         self.check_cli(["search", "project:Libvirt-python"], stdout=subj)
 
+    def test_import_no_to_header(self):
+        self.add_project(
+            "Linux",
+            "linux-kernel@vger.kernel.org",
+            "https://github.com/torvalds/linux",
+        )
+        self.cli_import("0036-patch-with-no-to-header.mbox.gz")
+        a = "[PATCH] fpga: microsemi-spi: add Microsemi FPGA manager"
+        self.check_cli(["search", "project:Linux"], stdout=a.strip())
+        self.check_cli(["search", "project:QEMU"], stdout='')
+
 
 class UnprivilegedImportTest(ImportTest):
     def setUp(self):
-- 
2.25.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel

Re: [Patchew-devel] [PATCH] import: Fix mailing list matching
Posted by Paolo Bonzini 2 months, 4 weeks ago
On 2/15/22 11:36, Fam Zheng wrote:
> If the mbox has no To: field, we have an empty addr in the returned
> address list. This is later used in Project.recognizes() as:
> 
>      if addr in self.mailing_list:
>          ...
> 
> Remove the empty result.
> 
> Also preprocess the mailing_list before matching.
> 
> Reported-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
> Signed-off-by: Fam Zheng <fam.zheng@bytedance.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

> ---
>   api/models.py                                   |   6 +++++-
>   mbox.py                                         |   2 ++
>   tests/data/0036-patch-with-no-to-header.mbox.gz | Bin 0 -> 4783 bytes
>   tests/test_import.py                            |  11 +++++++++++
>   4 files changed, 18 insertions(+), 1 deletion(-)
>   create mode 100644 tests/data/0036-patch-with-no-to-header.mbox.gz
> 
> diff --git a/api/models.py b/api/models.py
> index 5879466..18392b1 100644
> --- a/api/models.py
> +++ b/api/models.py
> @@ -265,11 +265,15 @@ class Project(models.Model):
>               return True
>           return False
>   
> +    def get_mailing_lists(self):
> +        r = self.mailing_list.split()
> +        return [x.rstrip(',;') for x in r]
> +
>       def recognizes(self, m):
>           """Test if @m is considered a message in this project"""
>           addr_ok = False
>           for name, addr in m.get_to() + m.get_cc():
> -            if addr in self.mailing_list:
> +            if addr in self.get_mailing_lists():
>                   addr_ok = True
>                   break
>           if addr_ok:
> diff --git a/mbox.py b/mbox.py
> index 20abca1..bcd3600 100644
> --- a/mbox.py
> +++ b/mbox.py
> @@ -115,6 +115,8 @@ class MboxMessage(object):
>           addrs = email.utils.getaddresses(f)
>           for name, addr in addrs:
>               name = name or addr
> +            if not addr:
> +                continue
>               if text:
>                   ret.append(_addr_fmt_text(name, addr))
>               else:
> diff --git a/tests/data/0036-patch-with-no-to-header.mbox.gz b/tests/data/0036-patch-with-no-to-header.mbox.gz
> new file mode 100644
> index 0000000000000000000000000000000000000000..32a33915a9317151845bec80e3349b7de8064ac5
> GIT binary patch
> literal 4783
> zcmV;g5>V|QiwFq4dJAFz128Z%HZ5>rbYo~OcWHEJEpBfubZ;$aWnpAxaxQIRZ+HOB
> zT4{IMN|XK!zoM_-xj7J!kl2iI>^Cg3%{5y9Z^`872&n~%wGb^{a&P|oRJRr+A&4_)
> z=FIpcHgs22*ZOpIOBc3fAk$h}$}3uU7+v5c;v0zP+FZR|Z=fnyt>$Og^=y-wO76Oi
> zKIoe1y)cj1HnGlF&nC7%`d?VfUY+OfnfXRCnBE%8FwERy+tDnujmT)naU{plOjKj*
> zEQbnJj;}LZmEn$y$TIUe>DggChk3@1%T$?1kjLnchR*QpGhVW?rC`akEn6ZhfmSls
> zp0LtJDly_|g>81L2r8rpzEo>0Uv04`O_pzcE#`B}SL7J(hSe<_Cpf2;<Eq+A5j|_}
> z8VU2!Vu~~c@m0Pd^y;<RMI)b6Ej#IokCH8~L7(`V=cj07nPtS+sbh&V;d8rs+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dCE(|u3bNFAU~*bI7U?cFIPL8=tmzZo!D}6|OX&Czs>crG
> z2d{UsE^ZXf*?V&nJZno`-Pl;il7shL=h0_g{~s=Ee(x$V<%(!mj9qKQrhn&t0NAoF
> zH4a@2#4owuqI@bMY2{PXzje9sqPhQ*cN?mtJBKef{4~o*by5)-MdBwP$YcHYXOfOe
> zJ{%*CVYhds`)IcmTZV(QF}Y!}9+n+al~a%UGH?J~xZL-=;*C%A4pj_Di7I9vzMMu8
> zr941wh>t%c9a<PaVS+rPixtc0@?t7p3$w8>j56&HI+fUu#*>jSI*lbuSm}O^lQLM@
> z+XbTspf+BSmlwlaO}#EP3SO6rwY2~XJ8>veJSiqJak`k1r@G=~CVm!XlLC2UdMG)!
> z!5~*JsWr%?rZ^!u!YY3w)+E~r`F^ws-|%3<mnfj5eiEhs{uw02XwttK3SwWl9rOhM
> zV#Tla?3IeA`}B<7<j7DH=619s$q7;jW>H-YN0!SO3co>LOWje|UooL=+@Jo7YAK#z
> zG^%u36Im5TCulWlib&sg&7ulCM(I+bbFmnuxQuvav0#QFx$-);N;I@_?LxNIg!gAu
> z^!}SU;@0jomp|(JDsu0<HycdJ+X;nzxnJByV+gSr&xOL#<#b5K8HT)A6}(8C|1TZ)
> JuGBa;006i%C-VRR
> 
> literal 0
> HcmV?d00001
> 
> diff --git a/tests/test_import.py b/tests/test_import.py
> index af7830b..ec1ebc4 100755
> --- a/tests/test_import.py
> +++ b/tests/test_import.py
> @@ -86,6 +86,17 @@ class ImportTest(PatchewTestCase):
>           )
>           self.check_cli(["search", "project:Libvirt-python"], stdout=subj)
>   
> +    def test_import_no_to_header(self):
> +        self.add_project(
> +            "Linux",
> +            "linux-kernel@vger.kernel.org",
> +            "https://github.com/torvalds/linux",
> +        )
> +        self.cli_import("0036-patch-with-no-to-header.mbox.gz")
> +        a = "[PATCH] fpga: microsemi-spi: add Microsemi FPGA manager"
> +        self.check_cli(["search", "project:Linux"], stdout=a.strip())
> +        self.check_cli(["search", "project:QEMU"], stdout='')
> +
>   
>   class UnprivilegedImportTest(ImportTest):
>       def setUp(self):

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel