diff --git a/mbuni/mmsbox/bearerbox.c b/mbuni/mmsbox/bearerbox.c index de4140c..0bbf3ce 100644 --- a/mbuni/mmsbox/bearerbox.c +++ b/mbuni/mmsbox/bearerbox.c @@ -43,6 +43,13 @@ static int auth_check(Octstr *user, Octstr *pass, List *headers) int i, res = -1; Octstr *v = http_header_value(headers, octstr_imm("Authorization")); Octstr *p = NULL, *q = NULL; + + if (user == NULL || + octstr_len(user) == 0) { + res = 0; + goto done; + } + if (!v || octstr_search(v, octstr_imm("Basic "), 0) != 0) goto done;