Project

General

Profile

Feature #2906 ยป 0002-401-Unauthorized.patch

gcleary, 2018-09-05 14:12

View differences:

lighttpd-1.4.49/src/mod_auth.c 2018-09-04 15:39:49.455567274 -0400
}
if (0 != strncasecmp(ds->value->ptr, "Basic ", sizeof("Basic ")-1)) {
return mod_auth_send_400_bad_request(srv, con);
return mod_auth_send_401_unauthorized_basic(srv, con, require->realm);
}
#ifdef __COVERITY__
if (buffer_string_length(ds->value) < sizeof("Basic ")-1) {
......
}
if (0 != strncasecmp(ds->value->ptr, "Digest ", sizeof("Digest ")-1)) {
return mod_auth_send_400_bad_request(srv, con);
return mod_auth_send_401_unauthorized_digest(srv, con, require->realm, 0);
} else {
size_t n = buffer_string_length(ds->value);
#ifdef __COVERITY__
    (1-1/1)