From: Jaroslav Kysela Date: Wed, 13 Mar 2019 17:30:06 +0000 (+0100) Subject: http server: fix digest MD5 authorization, fixes #5573 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f0c6b1e28fc5bae5c3e8934c8a79400236a1ac8;p=thirdparty%2Ftvheadend.git http server: fix digest MD5 authorization, fixes #5573 --- diff --git a/lib/api/python/tvh-json.py b/lib/api/python/tvh-json.py index 4619d5937..02b8e33e8 100755 --- a/lib/api/python/tvh-json.py +++ b/lib/api/python/tvh-json.py @@ -135,6 +135,8 @@ def do_export(*args): def do_exportcls(*args): if len(args) < 1: error(1, 'get [class]') body = do_get0('raw/export', {'class':args[0]}) + if not body: + return if type(body) != type({}) and type(body) != type([]): error(11, 'Unknown data') if 'entries' in body: diff --git a/src/http.c b/src/http.c index 1e2bea391..698167f46 100644 --- a/src/http.c +++ b/src/http.c @@ -1052,7 +1052,7 @@ http_verify_prepare(http_connection_t *hc, struct http_verify_structure *v) char all[1024]; int res = -1; - if (algo1 == NULL) { + if (algo1 == NULL || strcasecmp(algo1, "MD5") == 0) { v->algo = HTTP_AUTH_ALGO_MD5; } else if (strcasecmp(algo1, "SHA-256") == 0) { v->algo = HTTP_AUTH_ALGO_SHA256;