[cups.general] Open url in browser on print send

Michael Sweet msweet at apple.com
Fri Oct 16 09:44:41 PDT 2009


On Oct 16, 2009, at 12:41 AM, alet at librelogiciel.com wrote:
> On Thu, Oct 15, 2009 at 10:08:15PM -0700, Michael Sweet wrote:
>> On Oct 15, 2009, at 7:57 PM, Lachlan Macwhirter wrote:
>>
>>> Hi, apologies if this should be in a different forum. I have a
>>> printer set up in cups that I can send too via ipp. Would it be
>>> possible to have jobs sent to this printer return a url to the
>>> sender and have the sender open that url in a browser?
>>>
>>> Basically want to print the job, have the printer render the job as
>>> an image and return a url to the sender pointing at that image.
>>
>> Sorry, but that's not possible through CUPS.  You can define an RPC
>> mechanism for a backend to talk to a user application, but that
>> generally would only work on the local system and you'd need to be
>> sure you are talking to the owner of the job (unless you don't care
>> about privacy issues...)
>
> I respectfully disagree : any backend already knows the jobid, print
> queue name (and user name), so can retrieve the job-originating-host- 
> name
> and job-originating-user-name attributes for a job through a single
> IPP_GET_JOB_ATTRIBUTES query to http://localhost:631
>
> Once these values are known, your backend can interact with a client
> side application which expects incoming connexions from the print
> server (your backend).


Note that, as a side-effect of allowing Samba and cups-lpd to provide  
their own remote host information, job-originating-host-name can be  
spoofed from the local system.  Therefore, it should not be relied  
upon for this sort of thing.

Similarly, the job-originating-user-name can be spoofed (although you  
can require authentication to make that less likely), so you have to  
be careful about relying on that information as well.

Regardless, you would still want to ensure that the desktop you are  
talking to has the specified user logged in, otherwise you're showing  
potentially sensitive information to someone else.

___________________________________________________
Michael Sweet, Senior Printing System Engineer







More information about the cups mailing list