diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 596a953dcb..24530edc14 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -1556,14 +1556,14 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even user = cmd + 9; - if ((pass = strchr(user, ':'))) { - *pass++ = '\0'; - } - if ((domain_name = strchr(user, '@'))) { *domain_name++ = '\0'; } + if ((pass = strchr(user, ':'))) { + *pass++ = '\0'; + } + if (zstr(user) || zstr(domain_name)) { switch_snprintf(reply, reply_len, "-ERR invalid"); switch_clear_flag_locked(listener, LFLAG_RUNNING);