diff --git a/cups-str3312.patch b/cups-str3312.patch new file mode 100644 index 0000000..f6445d0 --- /dev/null +++ b/cups-str3312.patch @@ -0,0 +1,40 @@ +diff -up cups-1.4rc1/cgi-bin/admin.c.str3312 cups-1.4rc1/cgi-bin/admin.c +--- cups-1.4rc1/cgi-bin/admin.c.str3312 2009-05-11 22:21:29.000000000 +0100 ++++ cups-1.4rc1/cgi-bin/admin.c 2009-08-27 16:33:00.691275487 +0100 +@@ -628,6 +628,15 @@ do_am_class(http_t *http, /* I - HTTP c + return; + } + ++ if (!name) ++ { ++ cgiSetVariable("ERROR", cgiText(_("Missing form variable!"))); ++ cgiStartHTML(title); ++ cgiCopyTemplateLang("error.tmpl"); ++ cgiEndHTML(); ++ return; ++ } ++ + for (ptr = name; *ptr; ptr ++) + if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' || *ptr == '#') + break; +@@ -662,8 +671,7 @@ do_am_class(http_t *http, /* I - HTTP c + request = ippNewRequest(CUPS_ADD_CLASS); + + httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, +- "localhost", 0, "/classes/%s", +- cgiGetVariable("PRINTER_NAME")); ++ "localhost", 0, "/classes/%s", name); + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", + NULL, uri); + +diff -up cups-1.4rc1/templates/modify-class.tmpl.str3312 cups-1.4rc1/templates/modify-class.tmpl +--- cups-1.4rc1/templates/modify-class.tmpl.str3312 2008-09-20 04:33:59.000000000 +0100 ++++ cups-1.4rc1/templates/modify-class.tmpl 2009-08-27 16:33:00.693275103 +0100 +@@ -4,6 +4,7 @@ + +