]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fixes for the pernament tickets, issue #5274
authorJaroslav Kysela <perex@perex.cz>
Sun, 21 Oct 2018 08:37:23 +0000 (10:37 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 21 Oct 2018 08:37:23 +0000 (10:37 +0200)
src/access.c
src/webui/webui.c

index a0c0cd6bf301b8e2a8df8df6fef053ad4a1645df..1210a9d4979e2dda3a38cd0104f752548af98ac1 100644 (file)
@@ -867,6 +867,7 @@ access_get_by_auth(struct sockaddr_storage *src, const char *id)
     return NULL;
   a = access_get(src, pw->pw_username, access_get_by_auth_verify, NULL);
   a->aa_rights &= ACCESS_STREAMING;
+  tvh_str_set(&a->aa_auth, id);
   return a;
 }
 
index 731bf9f57aa2427eaf08f0ab4c64d1e39e49ac1c..cde6d1cae520358643972e94694864fbeadf587b 100644 (file)
@@ -1006,7 +1006,7 @@ page_http_playlist_
     case PLAYLIST_SATIP_M3U: cs = "satip/channels"; break;
     default:                 cs = "channels"; break;
     }
-    snprintf(buf, sizeof(buf), "playlist%s/%s", page_playlist_authpath(urlauth), cs);
+    snprintf(buf, sizeof(buf), "/playlist%s/%s", page_playlist_authpath(urlauth), cs);
     http_redirect(hc, buf, &hc->hc_req_args, 0);
     return HTTP_STATUS_FOUND;
   }
@@ -1062,12 +1062,12 @@ page_http_playlist_
     if (s[0] != '\0' && strcmp(s, "m3u") && strcmp(s, "m3u8"))
       r = HTTP_STATUS_BAD_REQUEST;
     else if(!strcmp(cmd, "tags"))
-      r = http_tag_list_playlist(hc, urlauth, pltype);
+      r = http_tag_list_playlist(hc, pltype, urlauth);
     else if(!strcmp(cmd, "channels"))
-      r = http_channel_list_playlist(hc, urlauth, pltype);
+      r = http_channel_list_playlist(hc, pltype, urlauth);
     else if(pltype != PLAYLIST_SATIP_M3U &&
             !strcmp(cmd, "recordings"))
-      r = http_dvr_list_playlist(hc, urlauth, pltype);
+      r = http_dvr_list_playlist(hc, pltype, urlauth);
     else {
       r = HTTP_STATUS_BAD_REQUEST;
     }
@@ -1530,13 +1530,13 @@ page_play_path_modify5(http_connection_t *hc, const char *path, int *cut)
 }
 
 static char *
-page_play_path_modify12(http_connection_t *hc, const char *path, int *cut)
+page_play_path_modify10(http_connection_t *hc, const char *path, int *cut)
 {
-  return page_play_path_modify_(hc, path, cut, 12);
+  return page_play_path_modify_(hc, path, cut, 10);
 }
 
 static char *
-page_play_path_modify16(http_connection_t *hc, const char *path, int *cut)
+page_play_path_modify12(http_connection_t *hc, const char *path, int *cut)
 {
   return page_play_path_modify_(hc, path, cut, 12);
 }
@@ -2026,7 +2026,7 @@ webui_init(int xspf)
 
   http_path_add_modify("/play", NULL, page_play, ACCESS_ANONYMOUS, page_play_path_modify5);
   http_path_add_modify("/play/ticket", NULL, page_play_ticket, ACCESS_ANONYMOUS, page_play_path_modify12);
-  http_path_add_modify("/play/auth", NULL, page_play_auth, ACCESS_ANONYMOUS, page_play_path_modify16);
+  http_path_add_modify("/play/auth", NULL, page_play_auth, ACCESS_ANONYMOUS, page_play_path_modify10);
   http_path_add("/dvrfile", NULL, page_dvrfile, ACCESS_ANONYMOUS);
   http_path_add("/favicon.ico", NULL, favicon, ACCESS_WEB_INTERFACE);
   http_path_add("/playlist", NULL, page_http_playlist, ACCESS_ANONYMOUS);