talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit fcc25329049b6f9bd8d890f1197ed61eb12e14d5
parent 12872fedd939ee5d4b4c48540855a3b6d6e3debc
Author: Paul <paul@claws-mail.org>
Date:   Mon, 13 Jul 2020 10:39:19 +0100

fix STARTTLS protocol violation

with thanks to, and patch by Damian Poddebniak and Hanno Böck

Diffstat:
MAUTHORS | 3++-
Msrc/common/session.c | 7+++++++
Msrc/gtk/authors.h | 3++-
3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/AUTHORS b/AUTHORS @@ -310,7 +310,7 @@ contributors (in addition to the above; based on Changelog) Arthur Huillet Blatinox Andy Balaam - Hanno Boeck + Hanno Böck Ben Hutchings Ralf Bormann Darac Marjal @@ -331,4 +331,5 @@ contributors (in addition to the above; based on Changelog) Alexander Lyons Harkness Jakub Kiciński Jean Delvare + Damian Poddebniak diff --git a/src/common/session.c b/src/common/session.c @@ -418,6 +418,13 @@ gint session_start_tls(Session *session) return -1; } + if (0 < session->read_buf_len) { + g_warning("protocol violation: suffix data after STARTTLS detected."); + if (nb_mode) + sock_set_nonblocking_mode(session->sock, session->nonblocking); + return -1; + } + if (nb_mode) sock_set_nonblocking_mode(session->sock, session->nonblocking); diff --git a/src/gtk/authors.h b/src/gtk/authors.h @@ -100,7 +100,7 @@ static char *CONTRIBS_LIST[] = { "Laurent Bigonville", "Jean-Luc Biord", "Blatinox", -"Hanno Boeck", +"Hanno Böck", "Pavlo Bohmat", "Ralf Bormann", "H. Merijn Brand", @@ -253,6 +253,7 @@ static char *CONTRIBS_LIST[] = { "Thomas Orgis", "Reza Pakdel", "Richard Palo", +"Damian Poddebniak", "Marcel Pol", "Martin Pool", "Quar",