Fix duplicate authentication
ClosedPublic

Authored by fvogt on Dec 22 2017, 10:56 AM.

Details

Summary

The response to EHLO triggers an authentication command, but with TLS
two EHLOs are sent: For the 220 from the server and after TLS negotiation.
However, sending it twice results in an unexpected "503 already authenticated"
response which ends up getting parsed by the SendJob, causing confusion.

BUG: 387926
BUG: 388068

Diff Detail

Repository
R733 KSmtp
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
fvogt requested review of this revision.Dec 22 2017, 10:56 AM
fvogt created this revision.
lbeltrame added a subscriber: KDE PIM.

Tested successfully with 5 different SMTP servers with both SSL and TLS.

This should probably be fixed differently: Retriggering the EHLO-resend in encryptionNegotiationResult instead of in SessionThread.

I'm not sure how to do that without code duplication however. It would then also respect the customHostname setting.

asn added a subscriber: asn.Dec 22 2017, 11:04 AM
fvogt updated this revision to Diff 24284.Dec 22 2017, 11:18 AM

Move the resending to SessionPrivate. Also uses the correct hostname now.

Looks good, thank you!

Please commit to Applications/17.12 branch.

dvratil accepted this revision.Dec 23 2017, 11:48 AM
This revision is now accepted and ready to land.Dec 23 2017, 11:48 AM
This revision was automatically updated to reflect the committed changes.