-
- Downloads
[FIX] mail: bad CTE/QP decoding of rfc822-headers
Based on RFC3462, a Content-Type text/rfc822-headers exists and provide a mechanism to label and return only the RFC 822 headers of a failed message (bounce) These are only the headers and not the full message. The Content-Type-Encoding should be either 7-bit(US-ASCII) or Quoted-Printable (QP) as in the section 2 of the RFC. Spawn the error: After getting reported by a customer, I had to reproduce by spamming wrong outlook addresses and add logging in a sh database on the message_process of mail_thread.py and logged the `message` variable. After few retry, I got one of the part that was defined as followed: Content-Description: Undelivered Message Headers Content-Type: text/rfc822-headers Content-Transfer-Encoding: quoted-printable The `get_payload()`function used was only assuming that there is a full email on that part and that it could only be encoded as an email, which was not the case in this situation (quoted-printable: 76 characters per line, character `=` used as the end of line character). opw-3064589 task-3131561 closes odoo/odoo#109770 Signed-off-by:Julien Castiaux <juc@odoo.com> Co-authored-by:
Baptiste Vergote <bve@odoo.com>
Showing
- addons/mail/models/mail_thread.py 1 addition, 1 deletionaddons/mail/models/mail_thread.py
- addons/test_mail/data/test_mail_data.py 84 additions, 0 deletionsaddons/test_mail/data/test_mail_data.py
- addons/test_mail/tests/test_mail_gateway.py 25 additions, 0 deletionsaddons/test_mail/tests/test_mail_gateway.py
Loading