#1033616 cups prepends job number to job-name so job names near 255 characters may be too long

Package:
cups
Source:
cups
Description:
Common UNIX Printing System(tm) - PPD/driver support, web interface
Submitter:
John Hughes
Date:
2024-04-25 18:00:46 UTC
Severity:
normal
Tags:
#1033616#5
Date:
2023-03-28 16:45:02 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

I printed a page from firefox with a very, very long URL.  Firefox used the first 255 bytes of the URL as the job name.

   * What was the outcome of this action?

The job mysteriously didn't print.  Lookin in the cups log (with debug on) I found the lines:

D [28/Mar/2023:18:14:44 +0200] [Job 365] job-name nameWithoutLanguage 365 - https://xxxxxxxxxxx/xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

D [28/Mar/2023:18:27:36 +0200] [Job 369] Validate-Job: client-error-request-value-too-long (client-error-request-value-too-long)

notice how the job name passed to cups ("https://xxx...") is shorter than 255 characters, but when the job number "365 - " is prepended it is longer tnan 255 characters and so overflows.

   * What outcome did you expect instead?

That my print job be printed rather than just geting stuck in the print queue forever.

How to reproduce:

	lp -o 'job-name=https://xxxxxxxxxxx/xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

#1033616#12
Date:
2023-03-29 14:24:10 UTC
From:
To:
Thank you for your report, John.

I think it would be better if you took this upstream:

https://github.com/OpenPrinting/cups/issues

Regards,

Brian.