more places to fix the new linebreak behaviour of the base64 encoder.
[citadel.git] / citadel / modules / managesieve / serv_managesieve.c
index 7158f4c009543ed5b613f5da446c99703ad2c2d7..23f5f263c614b67b8db4ea489c3ff841bc33fae8 100644 (file)
@@ -507,7 +507,10 @@ void mgsve_auth(char *argbuf) {
                if (strlen(argbuf) >= 7) {
                }
                else {
-                       CtdlEncodeBase64(username_prompt, "Username:", 9, 0);
+                       size_t len = CtdlEncodeBase64(username_prompt, "Username:", 9, 0);
+                       if (username_prompt[len - 1] == '\n') {
+                               username_prompt[len - 1] = '\0';
+                       }
                        cprintf("334 %s\r\n", username_prompt);
                }
                return;