@@ -285,9 +285,19 @@ cupsdProcessIPPRequest(
285285 * Bad character set...
286286 */
287287
288- cupsdLogClient (con , CUPSD_LOG_ERROR , "Unsupported character set \"%s\"" , charset -> values [0 ].string .text );
289- cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Unsupported attributes-charset value \"%s\"." , IPP_STATUS_ERROR_CHARSET , con -> http -> hostname , charset -> values [0 ].string .text );
290- send_ipp_status (con , IPP_STATUS_ERROR_CHARSET , _ ("Unsupported character set \"%s\"." ), charset -> values [0 ].string .text );
288+ cupsdLogClient (con , CUPSD_LOG_ERROR , "Unsupported \"attributes-charset\" value '%s'." , charset -> values [0 ].string .text );
289+ cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Unsupported \"attributes-charset\" value '%s'." , IPP_STATUS_ERROR_CHARSET , con -> http -> hostname , charset -> values [0 ].string .text );
290+ send_ipp_status (con , IPP_STATUS_ERROR_CHARSET , _ ("Unsupported \"attributes-charset\" value '%s'." ), charset -> values [0 ].string .text );
291+ }
292+ else if (language && !ippValidateAttribute (language ))
293+ {
294+ /*
295+ * Bad natural language...
296+ */
297+
298+ cupsdLogClient (con , CUPSD_LOG_ERROR , "Bad \"attributes-natural-language\" value '%s'." , language -> values [0 ].string .text );
299+ cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Bad \"attributes-natural-language\" value '%s'." , IPP_STATUS_ERROR_BAD_REQUEST , con -> http -> hostname , language -> values [0 ].string .text );
300+ send_ipp_status (con , IPP_STATUS_ERROR_BAD_REQUEST , _ ("Bad \"attributes-natural-language\" value '%s'." ), language -> values [0 ].string .text );
291301 }
292302 else if (!charset || !language ||
293303 (!uri &&
@@ -305,23 +315,23 @@ cupsdProcessIPPRequest(
305315
306316 if (!charset )
307317 {
308- cupsdLogClient (con , CUPSD_LOG_ERROR , "Missing attributes-charset attribute." );
318+ cupsdLogClient (con , CUPSD_LOG_ERROR , "Missing \" attributes-charset\" attribute." );
309319
310- cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Missing attributes-charset attribute." , IPP_STATUS_ERROR_BAD_REQUEST , con -> http -> hostname );
320+ cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Missing \" attributes-charset\" attribute." , IPP_STATUS_ERROR_BAD_REQUEST , con -> http -> hostname );
311321 }
312322
313323 if (!language )
314324 {
315- cupsdLogClient (con , CUPSD_LOG_ERROR , "Missing attributes-natural-language attribute." );
325+ cupsdLogClient (con , CUPSD_LOG_ERROR , "Missing \" attributes-natural-language\" attribute." );
316326
317- cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Missing attributes-natural-language attribute." , IPP_STATUS_ERROR_BAD_REQUEST , con -> http -> hostname );
327+ cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Missing \" attributes-natural-language\" attribute." , IPP_STATUS_ERROR_BAD_REQUEST , con -> http -> hostname );
318328 }
319329
320330 if (!uri )
321331 {
322- cupsdLogClient (con , CUPSD_LOG_ERROR , "Missing printer-uri, job-uri, or ppd-name attribute." );
332+ cupsdLogClient (con , CUPSD_LOG_ERROR , "Missing \" printer-uri\", \" job-uri\" , or \" ppd-name\" attribute." );
323333
324- cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Missing printer-uri, job-uri, or ppd-name attribute." , IPP_STATUS_ERROR_BAD_REQUEST , con -> http -> hostname );
334+ cupsdAddEvent (CUPSD_EVENT_SERVER_AUDIT , NULL , NULL , "%04X %s Missing \" printer-uri\", \" job-uri\" , or \" ppd-name\" attribute." , IPP_STATUS_ERROR_BAD_REQUEST , con -> http -> hostname );
325335 }
326336
327337 if (LogLevel < CUPSD_LOG_DEBUG2 )
0 commit comments