Commit bf959364 bf959364c67409ca94b7ea196dc6f569a6d34adb by Sergey Poznyakoff

(imap4d_authenticate): Do not proceed if tls_required is set.

1 parent 6ff823fa
...@@ -104,6 +104,9 @@ imap4d_authenticate (struct imap4d_command *command, char *arg) ...@@ -104,6 +104,9 @@ imap4d_authenticate (struct imap4d_command *command, char *arg)
104 if (!auth_type) 104 if (!auth_type)
105 return util_finish (command, RESP_BAD, "Too few arguments"); 105 return util_finish (command, RESP_BAD, "Too few arguments");
106 106
107 if (tls_required)
108 return util_finish (command, RESP_NO, "Command disabled: Use STARTTLS first");
109
107 adata.command = command; 110 adata.command = command;
108 adata.auth_type = auth_type; 111 adata.auth_type = auth_type;
109 adata.arg = sp; 112 adata.arg = sp;
......