SMTP: fix truncated attachment if it contains a line with a single dot
ClosedPublic

Authored by dfaure on Jan 18 2018, 9:58 PM.

Details

Summary

In SMTP speak, a line with a single dot means end of message. So if
we're attaching a text file that contains such a line, we need to
"escape" it by making it two dots, as the spec says.
No unescaping code needed, the SMTP server takes care of it.

Test Plan

Sending a text file that starts with ".\n" used to send
an empty file, now it works, I get the full file, intact.

Diff Detail

Repository
R733 KSmtp
Branch
Applications/17.12
Lint
No Linters Available
Unit
No Unit Test Coverage
dfaure created this revision.Jan 18 2018, 9:58 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptJan 18 2018, 9:58 PM
Restricted Application added a subscriber: KDE PIM. · View Herald Transcript
dfaure requested review of this revision.Jan 18 2018, 9:58 PM
mlaurent accepted this revision.Jan 19 2018, 5:51 AM

Good !

This revision is now accepted and ready to land.Jan 19 2018, 5:51 AM
dfaure closed this revision.Jan 29 2018, 10:27 AM