]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http server: fix digest MD5 authorization, fixes #5573
authorJaroslav Kysela <perex@perex.cz>
Wed, 13 Mar 2019 17:30:06 +0000 (18:30 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 13 Mar 2019 17:30:55 +0000 (18:30 +0100)
lib/api/python/tvh-json.py
src/http.c

index 4619d593746bd1133b745937d4cc61cd86042892..02b8e33e8590c60c5a2056073fecdf95b56deb6c 100755 (executable)
@@ -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:
index 1e2bea391cae6de4ff127fe68885622e97e9bca3..698167f46c014a4e3c81f4fcf3b72a029634ae10 100644 (file)
@@ -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;