Skip to content

Commit 8779733

Browse files
committed
Don't allow subscriptions with both notify-pull-method and notify-recipient-uri.
1 parent c1fcfbb commit 8779733

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

scheduler/ipp.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,14 @@ add_job_subscriptions(
20002000
}
20012001

20022002
if (!recipient && !pullmethod)
2003+
{
20032004
break;
2005+
}
2006+
else if (recipient && pullmethod)
2007+
{
2008+
send_ipp_status(con, IPP_STATUS_ERROR_BAD_REQUEST, _("Cannot specify both notify-pull-method and notify-recipient-uri in the same request."));
2009+
return;
2010+
}
20042011

20052012
if (mask == CUPSD_EVENT_NONE)
20062013
mask = CUPSD_EVENT_JOB_COMPLETED;
@@ -5988,7 +5995,14 @@ create_subscriptions(
59885995
}
59895996

59905997
if (!recipient && !pullmethod)
5998+
{
59915999
break;
6000+
}
6001+
else if (recipient && pullmethod)
6002+
{
6003+
send_ipp_status(con, IPP_STATUS_ERROR_BAD_REQUEST, _("Cannot specify both notify-pull-method and notify-recipient-uri in the same request."));
6004+
return;
6005+
}
59926006

59936007
if (mask == CUPSD_EVENT_NONE)
59946008
{

0 commit comments

Comments
 (0)