From e3762f1c26457e3691fe26694e9d7ebcd707d2a2 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 2 Oct 2014 19:59:36 +0200 Subject: [PATCH] webui: allow access to imagecache also to streaming clients (like htsp for icons) --- src/webui/webui.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/webui/webui.c b/src/webui/webui.c index 7b0df597..a3bf0511 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -1274,6 +1274,11 @@ page_imagecache(http_connection_t *hc, const char *remain, void *opaque) if(remain == NULL) return 404; + if(hc->hc_access == NULL || + (access_verify2(hc->hc_access, ACCESS_WEB_INTERFACE) && + access_verify2(hc->hc_access, ACCESS_STREAMING))) + return 405; + if(sscanf(remain, "%d", &id) != 1) return HTTP_STATUS_BAD_REQUEST; @@ -1352,7 +1357,7 @@ webui_init(int xspf) http_path_add("/stream", NULL, http_stream, ACCESS_STREAMING); - http_path_add("/imagecache", NULL, page_imagecache, ACCESS_WEB_INTERFACE); + http_path_add("/imagecache", NULL, page_imagecache, ACCESS_ANONYMOUS); webui_static_content("/static", "src/webui/static"); webui_static_content("/docs", "docs/html");