From: Jaroslav Kysela Date: Tue, 26 May 2015 07:12:45 +0000 (+0200) Subject: HTSP: verify channel only when set for autorec/timerec entries, fixes #2892 X-Git-Tag: v4.0.3~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9379606c5f451dec4025e577b88cd944bb9903fa;p=thirdparty%2Ftvheadend.git HTSP: verify channel only when set for autorec/timerec entries, fixes #2892 --- diff --git a/src/htsp_server.c b/src/htsp_server.c index 13a16c894..612657ebc 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -1737,7 +1737,7 @@ htsp_method_deleteAutorecEntry(htsp_connection_t *htsp, htsmsg_t *in) return htsp_error("User does not have access"); /* Check access */ - if (!htsp_user_access_channel(htsp, dae->dae_channel)) + if (dae->dae_channel && !htsp_user_access_channel(htsp, dae->dae_channel)) return htsp_error("User does not have access"); autorec_destroy_by_id(daeId, 1); @@ -1835,7 +1835,7 @@ htsp_method_deleteTimerecEntry(htsp_connection_t *htsp, htsmsg_t *in) return htsp_error("User does not have access"); /* Check access */ - if (!htsp_user_access_channel(htsp, dte->dte_channel)) + if (dte->dte_channel && !htsp_user_access_channel(htsp, dte->dte_channel)) return htsp_error("User does not have access"); timerec_destroy_by_id(dteId, 1);