1
0
Fork 0
Commit graph

35 commits

Author SHA1 Message Date
Adam Reisinger
488c726c2d fix message.text exception when attachment filename header contains weird characters
Add failing test for bad header character

fix

add comment
2024-04-25 13:01:43 +02:00
Pietro
997bed0164
Merge pull request #230 from rmlt/fix_message_rfc822_attachments__based_on_master
Fix message/rfc822 attachment processing
2023-12-19 22:43:59 +01:00
Pascal F
7fde5f7165
Support for Django 5.0 and python 3.12 + Fix CI (#277)
* Upgrade to last Django & Python supported versions

* flake8 fixes

* Add CI

* Add final version of Django 5.0
2023-12-09 19:01:53 -08:00
Miłosz Jerkiewicz
5bd961fae6 Fix message/rfc822 attachment processing 2020-08-05 12:30:00 +02:00
Adam Dobrawy
2b2b7d6392 Modernize syntax, drop Python EOL, drop drop Django<1.11, upgrade TravisCI config to v1, add Python 3.8 & Django 3.x 2019-11-09 19:23:08 +01:00
Adam Dobrawy
7eecb0d41d Fix text content with text attachment (#170)
* Add tests case for text content with text attachment

* Fix parsing text message with text attachment
2018-02-09 00:13:39 -08:00
Adam Dobrawy
0001a077fb Drop print in test 2017-07-09 21:38:11 +02:00
Adam Dobrawy
aa9f230558 Add support to compression of original messages 2017-07-09 20:38:29 +02:00
Lars Kruse
234ed00909 Add flake8 style check 2017-05-09 23:59:42 +02:00
Adam Dobrawy
e610f93341 Add test for message with long content (#109) 2016-08-03 10:11:20 -07:00
Adam Dobrawy
f32c0dd245 Fix parse UTF-8 filename - close #104 2016-06-30 15:43:08 +02:00
Adam Coddington
5b1ed1c66f Properly decode encoded filename headers. Fixes #96. 2016-05-14 23:37:49 -07:00
Adam Coddington
1c29cefa08 [#96] Fixing handling for unicode filename retrieval on python 2. 2016-05-14 23:31:55 -07:00
Adam Coddington
276917c6e6 [#96] Decode attachment filenames into unicodes. 2016-05-14 22:19:03 -07:00
antcorro
3c33a22c3e Fix for #82; Improper handling of badly-encoded documents.
* fix logging warning message

* decode as ascii on Decode error

* Add test case for #88 #82

* add test case bis for #88 #82
2016-04-04 12:28:11 -07:00
Adam Coddington
6cb5105b70 Disable specific test for Python 3.x. 2015-08-30 20:30:05 -07:00
Adam Coddington
33c5a0cba2 Merge pull request #64 from antcorro/master
Possible Fix UnicodeDecodeError in MessageAttachment headers
2015-08-30 20:08:56 -07:00
Adam Coddington
f2b352a68a Allow tests relating to mail replies to properly run for pull requests. 2015-08-30 19:40:29 -07:00
Antonio Corroppoli
0e6dcce0f5 Add test for message with not decoded attachment header 2015-08-18 17:55:07 +02:00
Adam Coddington
c1e3007aa6 Prevent e-mails from being dispatched during tests. 2015-08-04 07:41:02 -07:00
Adam Coddington
ff433a24f4 Always store payload parts having a Content-Disposition of 'attachment' as attachments, even if their Content-Type is text/plain. Fixes #52.
Squashed commit of the following:

commit 5bcbac33d6
Author: Adam Coddington <me@adamcoddington.net>
Date:   Tue Jul 7 23:05:15 2015 -0700

    Add handling for situations in which the message was deleted in another thread before processing.

commit 6183f68b39
Author: Adam Coddington <me@adamcoddington.net>
Date:   Tue Jul 7 22:58:15 2015 -0700

    Always store message as attachment if its content-disposition is marked as such.

commit 4c16494b1a
Author: Adam Coddington <me@adamcoddington.net>
Date:   Tue Jul 7 22:46:52 2015 -0700

    Adding a (hopefully) failing test case for #52.
2015-07-07 23:09:41 -07:00
Adam Dobrawy
835986c96a Added random eml file name, removed getattr related to self.mailbox.from_email in Message.reply, fix docs - second round of pull requests 2015-03-18 09:56:52 +01:00
Adam Dobrawy
552e033655 Added test django_mailbox.tests.test_process_email.TestProcessEmail.test_message_reply 2015-03-15 00:42:57 +01:00
Ariel Gerardo Ríos
826d0b1d88 Fix test methods for new accessors. 2014-09-01 15:31:29 -03:00
Adam Coddington
0f0628a742 Only expect additional space in Python 3.3+. 2014-04-22 17:13:41 -07:00
Adam Coddington
a2cf80ef99 Fixing header decoding such that it works properly under both Python 3.x and 2.x. 2014-04-22 17:06:17 -07:00
Adam Coddington
ef42c319e9 Updating yet another string for python3. 2014-04-22 16:24:16 -07:00
Adam Coddington
d871d41448 Fix test for Py3 support. 2014-04-22 16:06:34 -07:00
Adam Coddington
79e189fb22 Always decode headers into unicode objects before assigning to model; fixes #12. 2014-04-22 15:49:49 -07:00
Adam Coddington
88d122c421 Base64-encode message body when storing in DB.
* Since Django requires that the content stored in a TextField be unicode, we
  need some way to encode the message safely.  In situations before where
  a single-byte non-7-bit-clean encoding were used, django-mailbox could
  explode when writing the message copy to the database; this should ameliorate
  that problem.
* Reverts earlier changesets' encoding normalization.
2013-07-26 22:13:29 -07:00
Adam Coddington
4c3af900c6 Remove unicode literals from tests for Python3. 2013-07-26 19:18:57 -07:00
Adam Coddington
adb17e7d67 Adding tests and minor code changes to ensure that we properly handle the distinction between bytes and text when dehydrating/rehydrating messages. 2013-07-26 19:13:35 -07:00
Adam Coddington
3ee4b43936 Cleaning up tests; moving test e-mail messages; fixing bugs relating to message encoding rehydration.
--HG--
rename : django_mailbox/tests/generic_message.eml => django_mailbox/tests/messages/generic_message.eml
rename : django_mailbox/tests/message_with_attachment.eml => django_mailbox/tests/messages/message_with_attachment.eml
rename : django_mailbox/tests/message_with_defective_attachment_association.eml => django_mailbox/tests/messages/message_with_defective_attachment_association.eml
rename : django_mailbox/tests/message_with_defective_attachment_association_result.eml => django_mailbox/tests/messages/message_with_defective_attachment_association_result.eml
rename : django_mailbox/tests/message_with_image_jpg_mimetype.eml => django_mailbox/tests/messages/message_with_image_jpg_mimetype.eml
rename : django_mailbox/tests/message_with_long_text_lines.eml => django_mailbox/tests/messages/message_with_long_text_lines.eml
rename : django_mailbox/tests/message_with_many_multiparts.eml => django_mailbox/tests/messages/message_with_many_multiparts.eml
rename : django_mailbox/tests/message_with_many_multiparts_stripped_html.eml => django_mailbox/tests/messages/message_with_many_multiparts_stripped_html.eml
rename : django_mailbox/tests/message_with_utf8_char.eml => django_mailbox/tests/messages/message_with_utf8_char.eml
rename : django_mailbox/tests/multipart_text.eml => django_mailbox/tests/messages/multipart_text.eml
2013-07-26 18:07:31 -07:00
Adam Coddington
2e6c23a6f0 Revamping encoding handling to normalize encodings to UTF-8 for storage; back into original encoding during rehydration. 2013-07-26 01:01:07 -07:00
Adam Coddington
f92e2a8448 Reorganizing tests. 2013-07-25 23:45:39 -07:00