ipp backend fails when there is a URL printed from firefox with Trademark symbol

Bug #51755 reported by Bradley M. Kuhn
8
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

I am running Dapper with:

cupsys 1.2.0-0ubuntu5
firefox 1.5.dfsg+1.5.0.4-0ubuntu6
mozilla-firefox 1.5.dfsg+1.5.0.4-0ubuntu6

If you choose to print to a cups IPP printer from firefox, and the page you are printing has a ® HTML entity in the page TITLE, it uses that page title as the name of the job. This causes the job to crash the IPP backend.

One might argue that this is firefox's fault for putting a strange character in the job name. I am therefore filing this as a bug against the firefox package as well.

Revision history for this message
Kurt Pfeifle (pfeifle) wrote :

I can not reproduce this with my version of CUPS here (currently a self-compiled 1.3-r5706 from CUPS' Subversion repository). I'll test with a Dapper version later.

A few questions for clarification, and to try and help reproduce this:

 * with "&reg; HTML entity in the page TITLE" you mean the <title>...</title>
    tag in the HTML code?

 * with "page title as the name of the job" -- do you mean
    a) what's in the PostScript code as "%%Title:....", or
    b) what's in CUPS' error_log file on the "StartJob: argv = ...." line?

Revision history for this message
Bradley M. Kuhn (bkuhn-ebb) wrote : Re: [Bug 51755] Re: ipp backend fails when there is a URL printed from firefox with Trademark symbol
Download full text (3.8 KiB)

Kurt Pfeifle wrote:

> I can not reproduce this with my version of CUPS here (currently a
> self-compiled 1.3-r5706 from CUPS' Subversion repository). I'll test
> with a Dapper version later.

Thanks.

> A few questions for clarification, and to try and help reproduce this:
>
> * with "&reg; HTML entity in the page TITLE" you mean the <title>...</title>
> tag in the HTML code?

In the <title>...</title>

An example URL is:

  http://www.buttercupbakeshop.com/

An example URL is:
   http://www.kraftfoods.com/recipes/CakesPiesCheesecakes/CheesecakesBaked/PHILADELPHIAClassicCheesecake.html

Note on the second URL they have they have the Unicode character rather
than &reg; although the behavior seems to be the same.

> * with "page title as the name of the job" -- do you mean

What I actually meant was that when I type "lpq" on the system in question
when things get hung I get (for my first URL example):

notary is not ready
Rank Owner Job File(s) Total Size
1st bkuhn 15 Buttercup Bake Shop® 1966080 bytes

I am not sure how firefox is sending the job. I just chose Print from the
firefox menu and took its defaults to send to the configured CUPS printer
(called notary).

> a) what's in the PostScript code as "%%Title:....", or

I don't think so. If I look at the Postscript file in
/var/spool/cups/d00015-001 in the example above, it starts with:

%!PS-Adobe-3.0
%%BoundingBox: 0 0 612 792
%%HiResBoundingBox: 0 0 612 792
%%Creator: Mozilla PostScript module (rv:1.8.0.4/2006060817)
%%DocumentData: Clean8Bit
%%DocumentPaperSizes: Letter
%%Orientation: Portrait
%%Pages: 1
%%PageOrder: Ascend
%%EndComments
% MozillaCharsetName: iso-8859-1

%%BeginProlog
...
%%EndProlog
%%BeginResource: font DejaVu_Serif.Book.0.0.Set0
%!PS-AdobeFont-1.0-3.0 DejaVu_Serif.Book.0.0.Set0 1.0
%%Creator: Mozilla Freetype2 Printing code 2.0
%%Title: DejaVu_Serif.Book.0.0.Set0
%%Pages: 0
%%EndComments
...

a 'cat -v c00015' gives:

^A^A^@^B^@^@^@^A^AG^@^Rattributes-charset^@
iso-8859-1H^@^[attributes-natural-language^@^Een-us^BE^@^Kprinter-uri^@^_ipp://localhost/printers/notaryB^@^Yjob-originating-user-name^@^EbkuhnB^@^Hjob-name^@^TButtercup Bake ShopM-.I^@^Odocument-format^@^Vapplication/postscriptB^@
job-sheets^@^DnoneB^@^@^@^Dnone!^@^Ljob-priority^@^D^@^@^@2E^@^Hjob-uuid^@-urn:uuid:570f35bf-6dbf-3ca7-523d-883576377647B^@^Yjob-originating-host-name^@ localhost!^@^Ptime-at-creation^@^DDM-)M-^DM-g!^@^Rtime-at-processing^@^DDM-)M-^DM-g^S^@^Qtime-at-completed^@^@!^@^Fjob-id^@^D^@^@^@^O#^@ job-state^@^D^@^@^@^C!^@^Zjob-media-sheets-completed^@^D^@^@^@^AE^@^Ojob-printer-uri^@/ipp://localhost.localdomain:631/printers/notaryB^@^Hjob-name^@^TButtercup Bake ShopM-.!^@^Ljob-k-octets^@^D^@^@^GM-^@D^@^Njob-hold-until^@^Gno-hold^C

(not sure of a better way to give you the output of that, as it is a
binary data structure, but you see that the Unicode trademark symbol is
there in the job name)

> b) what's in CUPS' error_log file on the "StartJob: argv = ...."
> line?

Yes, argv[3] seems to have the Unicode character in it. I restarted the
server with debug error log level, resubmitted the job and got:

D [...

Read more...

Ante Karamatić (ivoks)
Changed in cupsys:
importance: Untriaged → Medium
status: Unconfirmed → Needs Info
Revision history for this message
Bradley M. Kuhn (bkuhn-ebb) wrote :

I noticed the bug is marked "Needs Info". Is the info above enough for you to proceed?

Revision history for this message
Ante Karamatić (ivoks) wrote :

I can't confirm this. Both pages print correctly, and lpq shows:

$ lpq
DeskJet-940C is ready and printing
Rank Owner Job File(s) Total Size
active ivoks 20 Buttercup Bake Shop� 1998848 bytes
1st ivoks 21 PHILADELPHIA� Classic Cheesecak 477184 bytes

Could you add your enviromental variables? LANG and LANGUAGE are important. Thank you.

Revision history for this message
Bradley M. Kuhn (bkuhn-ebb) wrote :

Ante Karamati?? wrote:
> I can't confirm this. Both pages print correctly, and lpq shows:
>
> $ lpq
> DeskJet-940C is ready and printing
> Rank Owner Job File(s) Total Size
> active ivoks 20 Buttercup Bake Shop??? 1998848 bytes
> 1st ivoks 21 PHILADELPHIA??? Classic Cheesecak 477184 bytes

It even works this way on a straight-up Dapper install for you? That is
odd.

> Could you add your enviromental variables? LANG and LANGUAGE are
> important. Thank you.

Here is the enviornment that might be relevant:

TERM=xterm
SHELL=/bin/bash
RT_USER=bkuhn
QT_XFT=1
WINDOW_MANAGER=sawfish
VERSION_CONTROL=numbered
USERNAME=bkuhn
DESKTOP_SESSION=default
GDM_XSERVER_LOCATION=local
LANG=en_US
LANGUAGE=en_US:en

   -- bkuhn

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cupsys (Ubuntu) because there has been no activity for 60 days.]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.