red-stream: Avoid to specify 2 mech names during SASL

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-12-12 17:20:39 +00:00
parent f3be28fb5e
commit cb099522bf

View File

@ -985,7 +985,7 @@ bool red_sasl_handle_auth_mechname(RedStream *stream, AsyncReadDone read_cb, voi
char quoted_mechname[SASL_MAX_MECHNAME_LEN + 4];
sprintf(quoted_mechname, ",%s,", sasl->mechname);
if (strstr(sasl->mechlist, quoted_mechname) == NULL) {
if (strchr(sasl->mechname, ',') || strstr(sasl->mechlist, quoted_mechname) == NULL) {
return false;
}