Correctly escape messages consisting of a dot in SMTP protocol

Actual bugfix is in the async-smtp crate.
This commit is contained in:
link2xt
2022-04-30 12:55:51 +00:00
parent f41df327a9
commit 48f2c4e14b
2 changed files with 13 additions and 1 deletions

2
Cargo.lock generated
View File

@@ -297,7 +297,7 @@ dependencies = [
[[package]]
name = "async-smtp"
version = "0.4.0"
source = "git+https://github.com/async-email/async-smtp?branch=master#3e7a8f3de19fdeb19d14cf123a8696c49685d3fa"
source = "git+https://github.com/async-email/async-smtp?branch=master#0cbf7043923b06612ce0dea7a3a3dae5ceaef578"
dependencies = [
"async-native-tls",
"async-std",

View File

@@ -960,6 +960,18 @@ class TestOnlineAccount:
chat.send_text("hello")
ac1._evtracker.get_matching("DC_EVENT_SMTP_MESSAGE_SENT")
def test_send_dot(self, acfactory, lp):
"""Test that a single dot is properly escaped in SMTP protocol"""
ac1, ac2 = acfactory.get_two_online_accounts()
chat = acfactory.get_accepted_chat(ac1, ac2)
lp.sec("sending message")
msg_out = chat.send_text(".")
lp.sec("receiving message")
msg_in = ac2._evtracker.wait_next_incoming_message()
assert msg_in.text == msg_out.text
def test_send_and_receive_message_markseen(self, acfactory, lp):
ac1, ac2 = acfactory.get_two_online_accounts()