Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HTSP: verify channel only when set for autorec/timerec entries, fixes…
… #2892
  • Loading branch information
perexg committed May 26, 2015
1 parent 9538719 commit feeea4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/htsp_server.c
Expand Up @@ -1746,7 +1746,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);
Expand Down Expand Up @@ -1842,7 +1842,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);
Expand Down

0 comments on commit feeea4b

Please sign in to comment.