Skip to content

Commit cecbbd7

Browse files
committed
Merge branch '0.3.x'
2 parents 5b06123 + a40c1b2 commit cecbbd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/datum_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ bool datum_api_check_admin_password_only(struct MHD_Connection * const connectio
440440
}
441441

442442
static enum MHD_DigestAuthAlgorithm datum_api_pick_digest_algo(struct MHD_Connection * const connection) {
443-
const char * const ua = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "User-Agent");
443+
const char *ua = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "User-Agent");
444+
if (!ua) ua = "";
444445
if (datum_config.api_allow_insecure_auth) {
445446
if (strstr(ua, "AppleWebKit/") && !(strstr(ua, "Chrome/") || strstr(ua, "Brave/") || strstr(ua, "Edge/"))) {
446447
return MHD_DIGEST_ALG_MD5;

0 commit comments

Comments
 (0)