landgraf / rpms / cups

Forked from rpms/cups 6 years ago
Clone
Blob Blame History Raw
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 02dc392..9aa8b80 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -1636,6 +1636,14 @@ add_job(cupsd_client_t  *con,		/* I - Client connection */
     return (NULL);
   }
 
+  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);
+  }
+
 #ifdef WITH_LSPP
   if (is_lspp_config())
   {
@@ -1736,6 +1744,8 @@ add_job(cupsd_client_t  *con,		/* I - Client connection */
   }
 #endif /* WITH_LSPP */
 
+
+
   if ((job = cupsdAddJob(priority, printer->name)) == NULL)
   {
     send_ipp_status(con, IPP_INTERNAL_ERROR,