Skip to content

Commit

Permalink
DBUS notifications could crash the scheduler (Issue #5143)
Browse files Browse the repository at this point in the history
- scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
  • Loading branch information
michaelrsweet committed Oct 23, 2017
1 parent 34be0e8 commit 49fa498
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
CHANGES - 2.2.6 - 2017-10-19
CHANGES - 2.2.6 - 2017-10-23
============================


Changes in CUPS v2.2.6
----------------------

- DBUS notifications could crash the scheduler (Issue #5143)
- Added USB quirks rules for Canon MP540 and Samsung ML-2160 (Issue #5148)
- Fixed TLS cipher suite selection with GNU TLS (Issue #5145)
- Fixed TLS cipher suite selection with GNU TLS (Issue #5145, Issue #5150)


Changes in CUPS v2.2.5
Expand Down
12 changes: 10 additions & 2 deletions scheduler/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,16 @@ add_job(cupsd_client_t *con, /* I - Client connection */
return (NULL);
}

attr = ippFindAttribute(con->request, "requesting-user-name", IPP_TAG_NAME);

if (attr && !ippValidateAttribute(attr))
{
send_ipp_status(con, IPP_ATTRIBUTES, _("Bad requesting-user-name value: %s"), cupsLastErrorString());
if ((attr = ippCopyAttribute(con->response, attr, 0)) != NULL)
attr->group_tag = IPP_TAG_UNSUPPORTED_GROUP;
return (NULL);
}

if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
Expand All @@ -1615,8 +1625,6 @@ add_job(cupsd_client_t *con, /* I - Client connection */
add_job_uuid(job);
apply_printer_defaults(printer, job);

attr = ippFindAttribute(job->attrs, "requesting-user-name", IPP_TAG_NAME);

if (con->username[0])
{
cupsdSetString(&job->username, con->username);
Expand Down

1 comment on commit 49fa498

@Z5T1
Copy link

@Z5T1 Z5T1 commented on 49fa498 Mar 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.