apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.93k stars 464 forks source link

URL encoding problems with admin.cgi (when using umlauts umlauts) #120

Closed michaelrsweet closed 21 years ago

michaelrsweet commented 21 years ago

Version: 1.1.19rc4 CUPS.org User: thomas.kaiser.phg-online

After creating a printer called "täst" I haven't been able to administrate it via admin.cgi and a browser running on a macintosh or windows.

The name of the queue will be displayed correctly but the URL is wrong: "t%st" instead of "t%E4st".

So all operations like eg.

"...:631/admin/?op=start-printer&printer_name=t%st" 

will fail because the name of the queue cannot be recognized by the admin.cgi itself. In error_log appears a line

start_printer: resource name '/printers/tst' no good!

On windows the name is displayed incorrectly and the printer cannot be found, too (seems like Unicode is used):

get_printer_attrs: resource name '/printers/tÀst' no good!
get_jobs: resource name '/printers/tÀst' no good!

If I try it locally on linux everything works as expected:

Printer 'täst' stopped by 'root'.
Printer 'täst' started by 'root'.
michaelrsweet commented 21 years ago

CUPS.org User: mike

Fixed in CVS for 1.1.20; see attached patch.

michaelrsweet commented 21 years ago

"str120.patch":

Index: ipp-var.c

RCS file: /development/cvs/cups/cgi-bin/ipp-var.c,v retrieving revision 1.34 diff -u -r1.34 ipp-var.c --- ipp-var.c 2003/04/08 03:45:14 1.34 +++ ipp-var.c 2003/06/14 16:51:08 @@ -101,13 +101,19 @@ char method[HTTP_MAX_URI], username[HTTP_MAX_URI], hostname[HTTP_MAX_URI],