This simplifies input_args() callbacks since they don't always have to check
for args[0] == NULL. This is enabled by default, because none of the current
users want it and it's somewhat unlikely there even will be those in future.
conn->version_received = TRUE;
return 1;
}
+ if (args[0] == NULL && !conn->list->set.allow_empty_args_input) {
+ i_error("%s: Unexpectedly received empty line", conn->name);
+ return -1;
+ }
return conn->list->v.input_args(conn, args);
}
bool client;
bool dont_send_version;
+ /* By default when only input_args() is used, or when
+ connection_input_line_default() is used, empty lines aren't allowed
+ since it would result in additional args[0] == NULL check. Setting
+ this to TRUE passes it through instead of logging an error. */
+ bool allow_empty_args_input;
/* Don't call client_connected() immediately on
connection_client_connect() with UNIX sockets. This is mainly
to make the functionality identical with inet sockets, which may