From nobody Sun Dec 22 06:28:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1629137997; cv=none; d=zohomail.com; s=zohoarc; b=NgHqnj1KC9qbrHZACuOZGb9YlJdmW6ZWZdrTc0XsTZPkn+Vked2aS+weEYSmZEThUq/O2vsPYdEIWoDWEs1i9pW/cJ0L6CD2KyOd8LEZWGGfd+ZwrjfDbXuYXyooH8ZHKgmQ4hFAgnpwctopIsjNEl3YNVM+exZJ2r0XZZbrggg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629137997; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=eTz6+w8n3avvZgin7zAEPsJDJQHCSC0Ybhg5MnfT9Pg=; b=OgI0pGvNuHcwyhLOao/XKPLHipVmtClRiEugrLgLpO3L1wO9+xfCUG7bYYWwteEDPH45grlgkfY3M8RyzaoPsCBnR3RveuosaQN9y5V73wBvwd1RKlcNieT9taLBixhmB3I5PsZKv69n4CFATUbe4EC5W1QQRCxLWcvceRV+zZM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1629137997531459.3104188612531; Mon, 16 Aug 2021 11:19:57 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-520-Oc8UArToM-aq2mSSacP_xg-1; Mon, 16 Aug 2021 14:19:52 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C4691008065; Mon, 16 Aug 2021 18:19:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 025075D9DD; Mon, 16 Aug 2021 18:19:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BE1B4181A3E9; Mon, 16 Aug 2021 18:19:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17GIJolM006438 for ; Mon, 16 Aug 2021 14:19:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 357762144B31; Mon, 16 Aug 2021 18:19:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 304112144B30 for ; Mon, 16 Aug 2021 18:19:46 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B9F76100B8D4 for ; Mon, 16 Aug 2021 18:19:46 +0000 (UTC) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237-Ci6iaZLmPdGzCkg823NDxw-1; Mon, 16 Aug 2021 14:19:42 -0400 Received: by mail-ej1-f49.google.com with SMTP id b15so33360965ejg.10; Mon, 16 Aug 2021 11:19:42 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id f12sm3968534ejz.99.2021.08.16.11.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 11:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629137996; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eTz6+w8n3avvZgin7zAEPsJDJQHCSC0Ybhg5MnfT9Pg=; b=UeQjuM0qrLCpoIoO0SNZ6EFKtk8Tgx9shWG1q9Q+Xk8aDiZ5gGeLFUU71XY9PeHLIHaMaJ kfMzjHjQb/X237VMZE5t3/Qn0VNYtYFXL64GWZ8tx7RAlquGymceQpckyr2ThRZAotkUjA mhrDzjZ+fiSer8cowyhsxCIen3E0z20= X-MC-Unique: Oc8UArToM-aq2mSSacP_xg-1 X-MC-Unique: Ci6iaZLmPdGzCkg823NDxw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=zdRTEaGA8KcwoXwN4HExqCGaAdV+CqR9fhMw81P4TPM=; b=Sx9khHSagC0OId8//KTvqlJbFskygs8VRj8zgi5BUOH8G2pUosMGQxTw1sFhZNetpF iI+BUNhn0KB93fimYFvJXvUSLl6peY9MiaxIHg0dw99YtcX8RxWkv4w+QwMVJx6jImSU Wdreprj+1nCs2BlnCDNTsjET64I7IyjNDGs0+DlHXZROJZz6jigrLTvcVmhWxJ8wVGyO qhc5Ria46OArxHxO696Ds+OgQ1cX4XYP72YTnBhL6yL9ZfRprdW3d2HTJSDw4l7zth+G yWPGZqMSOZsOk0wjqh2BO3cgxYUThkaGCBc8mcT9IOxn45irfqR5bhaOr+UgUZ1ldZT/ 9inQ== X-Gm-Message-State: AOAM532aOeE/W7/Urg1uQCingQYs6tVerKjtk7y6ntrpw8v7wAoVebNh ukJIJRkccHsuhGL1X7yQyCuqmVNTjLmrBg== X-Google-Smtp-Source: ABdhPJytCwkFqK+hkdV9A8c2+t0wU9+ASZ71c6k8gAOfnafTBycHKI6vbJEHwgjUdRC3hdDATTwF2A== X-Received: by 2002:a17:906:b0c8:: with SMTP id bk8mr17238215ejb.412.1629137981054; Mon, 16 Aug 2021 11:19:41 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Mon, 16 Aug 2021 20:19:39 +0200 Message-Id: <20210816181939.7142-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: patchew-devel@redhat.com Cc: John Snow Subject: [Patchew-devel] [PATCH] fix parsing of RFC2047 headers X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629137997893100001 Content-Type: text/plain; charset="utf-8" Quoting : > NOTE: Decoding and display of encoded-words occurs *after* a > structured field body is parsed into tokens. It is therefore > possible to hide special characters in encoded-words which, when > displayed, will be indistinguishable from special characters in the > surrounding text. For this and other reasons, it is NOT generally > possible to translate a message header containing encoded-words to > an unencoded form which can be parsed by an RFC 822 mail reader. So do not use decode_header() on the whole From header, instead parse the header first, then decode the name which could be RFC2047 encoded. Reported-by: John Snow Signed-off-by: Paolo Bonzini --- mbox.py | 3 ++- tests/data/0035-rfc2047-from.mbox.gz | Bin 0 -> 8188 bytes tests/test_mbox.py | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/data/0035-rfc2047-from.mbox.gz diff --git a/mbox.py b/mbox.py index be10166..20abca1 100644 --- a/mbox.py +++ b/mbox.py @@ -28,7 +28,8 @@ def _parse_header(header): =20 =20 def parse_address(addr_str): - name, addr =3D email.utils.parseaddr(_parse_header(addr_str)) + name, addr =3D email.utils.parseaddr(addr_str) + name =3D _parse_header(name) return name, addr =20 =20 diff --git a/tests/data/0035-rfc2047-from.mbox.gz b/tests/data/0035-rfc2047= -from.mbox.gz new file mode 100644 index 0000000000000000000000000000000000000000..1e59ea710ee9cf10c199c8b45ad= a078a103052fd GIT binary patch literal 8188 zcmVw#OW^!+BE^T6OcmVBOX>;Ppvi)<~?s{$)vE^03@bKGA)q5m-tL=3DvR& zwI8jW2aoonB%OQvpNO58E{Ntx9`^~)CTeA&T&tIuQk_HpGmqB9uV0;DQ?Q+_V9bv2Y9<6u<*^y8`8e%>5^QdIGpX4&gv5vZ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=3D5dkz`0cKX*AMXwj1!Zr7++er`rdcGogJNDnLcg( zjV|r;;8p379@>r6zj#~v3D(d@g*l8h^ig3BV-0O1JQ#0_~`L*?b-m=3DGc)t!(36|Y-ex!?Y3IL it(Z{4Z_WB>qomDp$i literal 0 HcmV?d00001 diff --git a/tests/test_mbox.py b/tests/test_mbox.py index 8a86d11..4312a2e 100755 --- a/tests/test_mbox.py +++ b/tests/test_mbox.py @@ -62,6 +62,12 @@ Virtualization: qemu.org | libvirt.org msg =3D mbox.MboxMessage(f.read()) self.assertTrue(msg.is_patch()) =20 + def test_rfc2047_from(self): + dp =3D self.get_data_path("0035-rfc2047-from.mbox.gz") + with open(dp, "r") as f: + msg =3D mbox.MboxMessage(f.read()) + self.assertTrue(msg.get_from()[1] =3D=3D 'AIERPATIJIANG1@kingsoft.= com') + def test_get_json(self): dp =3D self.get_data_path("0001-simple-patch.mbox.gz") with open(dp, "r") as f: --=20 2.31.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel