Skip to content

Commit 7362a8c

Browse files
committed
Correctly escape messages consisting of a dot in SMTP protocol
Actual bugfix is in the async-smtp crate.
1 parent c75c95a commit 7362a8c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/tests/test_account.py

+12
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,18 @@ def test_send_self_message(self, acfactory, lp):
960960
chat.send_text("hello")
961961
ac1._evtracker.get_matching("DC_EVENT_SMTP_MESSAGE_SENT")
962962

963+
def test_send_dot(self, acfactory, lp):
964+
"""Test that a single dot is properly escaped in SMTP protocol"""
965+
ac1, ac2 = acfactory.get_two_online_accounts()
966+
chat = acfactory.get_accepted_chat(ac1, ac2)
967+
968+
lp.sec("sending message")
969+
msg_out = chat.send_text(".")
970+
971+
lp.sec("receiving message")
972+
msg_in = ac2._evtracker.wait_next_incoming_message()
973+
assert msg_in.text == msg_out.text
974+
963975
def test_send_and_receive_message_markseen(self, acfactory, lp):
964976
ac1, ac2 = acfactory.get_two_online_accounts()
965977

0 commit comments

Comments
 (0)