Univention Bugzilla – Attachment 2293 Details for
Bug 17421
Fehlerhaftes Escaping von Druckerbeschreibungen und Standorten im cups-printer-Listener-Skript
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Ungetesteter Patch
tmp.patch (text/plain), 968 bytes, created by
Janek Walkenhorst
on 2010-02-12 16:34:18 CET
(
hide
)
Description:
Ungetesteter Patch
Filename:
MIME Type:
Creator:
Janek Walkenhorst
Created:
2010-02-12 16:34:18 CET
Size:
968 bytes
patch
obsolete
>Index: services/univention-printserver/cups-printers.py >=================================================================== >--- services/univention-printserver/cups-printers.py (Revision 15303) >+++ services/univention-printserver/cups-printers.py (Arbeitskopie) >@@ -53,7 +53,11 @@ > f=open(filename, 'w+') > os.chmod(filename, 0755) > print >>f, '#!/bin/sh' >- print >>f, '/usr/sbin/univention-lpadmin %s' % string.join(args, ' ') >+ # Escape args with '-quotes to allow spaces and special characters. >+ #+ Therefore each ' in the arg must be escaped or it would end the string prematurely: >+ #+ To escape a ' the string must be closed ('___') then a __'__ is inserted escaped by surrounding _"_"_ >+ #+ therefore each ' is replaced by '"'"'. '"'"' as python string is """'"'"'""" or "'\"'\"'" or '\'"\'"\'' >+ print >>f, '/usr/sbin/univention-lpadmin ' + ' '.join(map(lambda x: "'%s'" % x.replace("'", """'"'"'"""), args)) > f.close() > > def pkprinters(args):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 17421
: 2293