From 488c726c2d664b08fcc1d1cba9f6cdf4eea66006 Mon Sep 17 00:00:00 2001 From: Adam Reisinger Date: Thu, 25 Apr 2024 12:22:30 +0200 Subject: [PATCH] fix message.text exception when attachment filename header contains weird characters Add failing test for bad header character fix add comment --- .gitignore | 2 +- .../messages/bad_character_attachment.eml | 327 ++++++++++++++++++ django_mailbox/tests/test_process_email.py | 10 + django_mailbox/utils.py | 2 +- 4 files changed, 339 insertions(+), 2 deletions(-) create mode 100644 django_mailbox/tests/messages/bad_character_attachment.eml diff --git a/.gitignore b/.gitignore index 9209014c..dcf7cfe5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ include/* dummy_project/* .cache/ .tox/ -messages +/messages *.sqlite3 .idea/ venv/ \ No newline at end of file diff --git a/django_mailbox/tests/messages/bad_character_attachment.eml b/django_mailbox/tests/messages/bad_character_attachment.eml new file mode 100644 index 00000000..a2f5b508 --- /dev/null +++ b/django_mailbox/tests/messages/bad_character_attachment.eml @@ -0,0 +1,327 @@ +Received: from AS2PR02MB9809.eurprd02.prod.outlook.com (2603:10a6:20b:60e::20) + by DB7PR02MB4362.eurprd02.prod.outlook.com with HTTPS; Tue, 23 Apr 2024 + 10:38:27 +0000 +Received: from AM9PR02MB6609.eurprd02.prod.outlook.com (2603:10a6:20b:2cd::7) + by AS2PR02MB9809.eurprd02.prod.outlook.com (2603:10a6:20b:60e::20) with + Microsoft SMTP Server (version=TLS1_2, + cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Tue, 23 Apr + 2024 10:38:26 +0000 +Received: from AM9PR02MB6609.eurprd02.prod.outlook.com + ([fe80::7817:da99:60d5:c2cd]) by AM9PR02MB6609.eurprd02.prod.outlook.com + ([fe80::7817:da99:60d5:c2cd%4]) with mapi id 15.20.7472.044; Tue, 23 Apr 2024 + 10:38:26 +0000 +From: =?iso-8859-2?Q?Reisinger_=C1d=E1m?= +To: joker +Subject: bad character attachment +Thread-Topic: bad character attachment +Thread-Index: AQHalWpdT02RNiNo9EacvmR/jo7DDw== +Date: Tue, 23 Apr 2024 10:38:26 +0000 +Message-ID: + +Accept-Language: hu-HU, en-US +Content-Language: hu-HU +X-MS-Exchange-Organization-AuthAs: Internal +X-MS-Exchange-Organization-AuthMechanism: 04 +X-MS-Exchange-Organization-AuthSource: AM9PR02MB6609.eurprd02.prod.outlook.com +X-MS-Has-Attach: yes +X-MS-Exchange-Organization-Network-Message-Id: + 147665cf-d7eb-4c28-b097-08dc63818214 +X-MS-Exchange-Organization-SCL: 1 +X-MS-TNEF-Correlator: +X-MS-Exchange-Organization-RecordReviewCfmType: 0 +msip_labels: +x-ms-publictraffictype: Email +X-Microsoft-Antispam-Mailbox-Delivery: + ucf:0;jmr:0;auth:0;dest:I;ENG:(910001)(944506478)(944626604)(920097)(425001)(930097)(140003); +X-Microsoft-Antispam-Message-Info: + 08cyAXtTqqbGjtpbn1kW31yhay8HShE6HN5oST8t4yG798I/SC/mIep7IhbjU82ryLShiVefj/nbbMKifLEwMLQ8hl6aYuUvCvJTsLTaObuEdBoUirN4rljRDAual3lWKnKZ0lY8i+AzRruOvTPLsEwZklByndJTSdTneAlaVEdyAs7/oxgpctrO9sy1Ye1VU+W0W2Etv8KjOOZOLH3M0tuDgIZOmJTXNw8t5tS6RfnMgX0U+n44W3DwmgR2UVUH23vuQU0snX8eOHsw21OKNNM3jP3D2aFhr6djzQv3XnrcVKKX2sRS5TT8IVDEGhckkFtSgYStvDeg4mtUHZnm6z2Nl62d8K4VbOP7CmMAufs+TTySs0yz82ZVy+PVluUclcDljI1hIQcXCucz29+J6Me5T/2zXm0e/Am6x9zhH5BrevK7VmbPjV4OnW81r4u6btoaQNKRAlb5Ye9l1pHKEO00l91RwBPVf/gGw3zOU/B1CFreHZyb61kY2eHfOGOZstB5kzYZZ8NCnX9YLSF5vQ== +Content-Type: multipart/mixed; + boundary="_004_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_" +MIME-Version: 1.0 + +--_004_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_ +Content-Type: multipart/alternative; + boundary="_000_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_" + +--_000_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_ +Content-Type: text/plain; charset="iso-8859-2" +Content-Transfer-Encoding: quoted-printable + +test message + +--_000_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_ +Content-Type: text/html; charset="iso-8859-2" +Content-Transfer-Encoding: quoted-printable + + + + + + + +
+test message
+ + + +--_000_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_-- + +--_004_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_ +Content-Type: application/pdf; name="K�relem.pdf" +Content-Transfer-Encoding: base64 +Content-Disposition: attachment; filename="K�relem.pdf" + +JVBERi0xLjMKJcTl8uXrp/Og0MTGCjMgMCBvYmoKPDwgL0ZpbHRlciAvRmxhdGVEZWNvZGUgL0xl +bmd0aCAxODYgPj4Kc3RyZWFtCngBjZA9C8IwEIb3/IrX70QxTa5f6aq4uBVus04FB6FD6f8Hk1TB +KoJkuMvluOe59KjRIzkOFu0AE8/Q+pLRlI33kFiHgqyuCG2HAyMfO30gypEXFbgTCTPBgm+4QM7m +CnujU8iF8sMs5DLEDHIVH3xhHRNf8a1X8BknjjY/0OITnZlg5MonHxO+p9k0YDcvSiODAEE2Solo +slVwuoLcTXr+UPn6hYJS7cpoIrh7Mwnb8n3crH4Ap2JIHQplbmRzdHJlYW0KZW5kb2JqCjEgMCBv +YmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvUmVzb3VyY2VzIDQgMCBSIC9Db250ZW50 +cyAzIDAgUiAvTWVkaWFCb3ggWzAgMCA1OTUgODQyXQo+PgplbmRvYmoKNCAwIG9iago8PCAvUHJv +Y1NldCBbIC9QREYgL1RleHQgXSAvQ29sb3JTcGFjZSA8PCAvQ3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DAgbiAKMDAwMDAwMDQ4 +MSAwMDAwMCBuIAowMDAwMDAzMzExIDAwMDAwIG4gCjAwMDAwMDM5MjcgMDAwMDAgbiAKMDAwMDAw +MzU2MiAwMDAwMCBuIAowMDAwMDA0MTYzIDAwMDAwIG4gCjAwMDAwMTM0NTcgMDAwMDAgbiAKdHJh +aWxlcgo8PCAvU2l6ZSAxNCAvUm9vdCA5IDAgUiAvSW5mbyAxMyAwIFIgL0lEIFsgPGI5NDg3NDQ4 +OWJkZjc2YWU2MjQzNmY0ZjlhNDZlN2ViPgo8Yjk0ODc0NDg5YmRmNzZhZTYyNDM2ZjRmOWE0NmU3 +ZWI+IF0gPj4Kc3RhcnR4cmVmCjEzNjcyCiUlRU9GCg== + +--_004_AM9PR02MB6609243F575793E9C226F261E8112AM9PR02MB6609eurp_-- diff --git a/django_mailbox/tests/test_process_email.py b/django_mailbox/tests/test_process_email.py index d3316e89..b1975249 100644 --- a/django_mailbox/tests/test_process_email.py +++ b/django_mailbox/tests/test_process_email.py @@ -446,3 +446,13 @@ def test_message_compressed(self): with gzip.open(msg.eml.name, 'rb') as f: self.assertEqual(f.read(), self._get_email_as_text('generic_message.eml')) + + def test_message_bad_character_in_attachment_filename(self): + ''' + Regression test for handling weird characters in attachment filename headers. + Previously accessing msg.text threw an exception. + ''' + message = self._get_email_object('bad_character_attachment.eml') + msg = self.mailbox.process_incoming_message(message) + + self.assertIsNotNone(msg.text) diff --git a/django_mailbox/utils.py b/django_mailbox/utils.py index 8e971a05..58052115 100644 --- a/django_mailbox/utils.py +++ b/django_mailbox/utils.py @@ -103,7 +103,7 @@ def get_body_from_message(message, maintype, subtype): """ body = '' for part in message.walk(): - if part.get('content-disposition', '').startswith('attachment;'): + if convert_header_to_unicode(part.get('content-disposition', '')).startswith('attachment;'): continue if part.get_content_maintype() == maintype and \ part.get_content_subtype() == subtype: