return 0;
}
- if (msg->body->len == 0) {
+ if (msg->body == NULL || msg->body->len == 0) {
msg_err ("got zero length body, cannot continue");
rspamd_webui_send_error (conn_ent, 400, "Empty body is not permitted");
return 0;
return 0;
}
- if (msg->body->len == 0) {
+ if (msg->body == NULL || msg->body->len == 0) {
msg_err ("got zero length body, cannot continue");
rspamd_webui_send_error (conn_ent, 400, "Empty body is not permitted");
return 0;
return 0;
}
- if (msg->body->len == 0) {
+ if (msg->body == NULL || msg->body->len == 0) {
msg_err ("got zero length body, cannot continue");
rspamd_webui_send_error (conn_ent, 400, "Empty body is not permitted");
return 0;
return 0;
}
- if (msg->body->len == 0) {
+ if (msg->body == NULL || msg->body->len == 0) {
msg_err ("got zero length body, cannot continue");
rspamd_webui_send_error (conn_ent, 400, "Empty body is not permitted");
return 0;
return 0;
}
- if (msg->body->len == 0) {
+ if (msg->body == NULL || msg->body->len == 0) {
msg_err ("got zero length body, cannot continue");
rspamd_webui_send_error (conn_ent, 400, "Empty body is not permitted");
return 0;
if (!rspamd_webui_check_password (conn_ent, session, msg, cmd->privilleged)) {
return 0;
}
- if (cmd->require_message && msg->body->len == 0) {
+ if (cmd->require_message && (msg->body == NULL || msg->body->len == 0)) {
msg_err ("got zero length body, cannot continue");
rspamd_webui_send_error (conn_ent, 400, "Empty body is not permitted");
return 0;