errors="replace" destroys any non-UTF-8 byte, damaging 8-bit bodies and attachments. smtplib.sendmail accepts bytes directly.
Fix:
Pass the raw envelope.content bytes to smtp.sendmail without decoding.
Acceptance:
A message with non-UTF-8 / 8-bit content is relayed byte-for-byte.
SMTPProxyHandler.send_message (proxy_server.py:349) does:
message = data.decode("utf-8", errors="replace")
errors="replace" destroys any non-UTF-8 byte, damaging 8-bit bodies and attachments. smtplib.sendmail accepts bytes directly.
Fix:
- Pass the raw envelope.content bytes to smtp.sendmail without decoding.
Acceptance:
- A message with non-UTF-8 / 8-bit content is relayed byte-for-byte.
lyrathorpe
added the bug label 2026-06-17 17:12:09 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
SMTPProxyHandler.send_message (proxy_server.py:349) does:
errors="replace" destroys any non-UTF-8 byte, damaging 8-bit bodies and attachments. smtplib.sendmail accepts bytes directly.
Fix:
Acceptance: