Skip to content

Commit

Permalink
lib-smtp: server: Prevent calling smtp_server_connection_login() afte…
Browse files Browse the repository at this point in the history
…r smtp_server_connection_start().

Added assertion.
  • Loading branch information
stephanbosch authored and cmouse committed Dec 28, 2017
1 parent f091dd1 commit 3feb1ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-smtp/smtp-server-connection.c
Expand Up @@ -1129,6 +1129,7 @@ void smtp_server_connection_login(struct smtp_server_connection *conn,
const unsigned char *pdata, unsigned int pdata_len,
bool ssl_secured)
{
i_assert(!conn->started);
i_assert(conn->username == NULL);

conn->set.capabilities &= ~SMTP_CAPABILITY_STARTTLS;
Expand Down

0 comments on commit 3feb1ab

Please sign in to comment.