[cups.bugs] [HIGH] STR #1988: Printing not possible with line break or mis-interpreted encoding in job title

Till Kamppeter till.kamppeter at gmail.com
Tue Sep 26 13:19:25 PDT 2006


[STR New]

Tested with Mandriva 2007/CUPS 1.2.4 and Ubuntu Edgy/CUPS 1.2.3 with
current Debian patches.

See also

https://launchpad.net/distros/ubuntu/dapper/+source/cupsys/+bug/57445

especially my comments in the end.

This is a bug in /usr/lib/cups/filter/pstops.

To reproduce:

0. Install gv, a screen viewer for PostScript (or use "kghostview").

1. Create a PostScript file which does not contain a "%%Title:" line,
either by printing from an appropriate application into a file (for
example Firefox, document content does not matter) or by deleting this
line from an existing PostScript file with a text editor.

2. Type

cat file.ps | /usr/lib/cups/filter/pstops 1 user a 1 "" > result.ps
gv result.ps

You will see your PostScript file in a window. Close the window.

3. Type

cat file.ps | /usr/lib/cups/filter/pstops 1 user 'a

and press <Enter>. Then type

b' 1 "" > result.ps

and press <Enter> again. You have made pstops now treating a job with the
title "a<newline>b".

Do

gv result.ps

and you get an error.

So pstops cannot treat jobs whose titles have a newline inside, or where
due to a misinterpreted encoding a byte of decimal value 13 (= ASCII value
for newline) is not understood as part of a special character.

pstops should filter out the newlines and write all the text of the job
title into one line.

I have used also a machine with CUPS 1.2.4 both as server and as client.
for printing the example job of the Ubuntu report (see my test results
there) and always could not print. Note that I printed from Firefox 1.5.x
or 2.0beta (so encoding fixes in the command line clients have no effect,
as these Firefox versions talk directly to the CUPS daemon). By printing
to a file and then printing the file I could always print, as then no job
title gets imposed to the job.

Link: http://www.cups.org/str.php?L1988
Version: 1.2.4





More information about the cups mailing list