imapc_connection_handle_imap_resp_text() rejected an empty text atom
with "Missing text in resp-text". RFC 9051 change note #23 explicitly
made text optional in resp-text, so this error is wrong.
The check was dead code in practice — the imap parser only enters
ARG_PARSE_TEXT mode after a resp-text-code ending in ']', so the text
argument at args[1] is never an empty atom — but leaving it in place
risks breaking connections if the parser behavior ever changes.
return 0;
text = imap_args_to_str(args);
- if (*text != '[') {
- if (*text == '\0') {
- imapc_connection_input_error(conn,
- "Missing text in resp-text");
- return -1;
- }
+ if (*text != '[')
return 0;
- }
return imapc_connection_handle_resp_text(conn, text, key_r, value_r);
}