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 @@ + +
+ ++ + + + diff --git a/cups.spec b/cups.spec index c29ff5b..9d94a75 100644 --- a/cups.spec +++ b/cups.spec @@ -10,7 +10,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4 -Release: 0.%{pre}.19%{?dist} +Release: 0.%{pre}.20%{?dist} License: GPLv2 Group: System Environment/Daemons Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{?pre}%{?svn}-source.tar.bz2 @@ -71,6 +71,7 @@ Patch43: cups-str3292.patch Patch44: cups-str3293.patch Patch45: cups-str3308.patch Patch46: cups-str3311.patch +Patch47: cups-str3312.patch Patch100: cups-lspp.patch Epoch: 1 Url: http://www.cups.org/ @@ -242,6 +243,7 @@ module. %patch44 -p1 -b .str3293 %patch45 -p1 -b .str3308 %patch46 -p1 -b .str3311 +%patch47 -p1 -b .str3312 %if %lspp %patch100 -p1 -b .lspp @@ -536,6 +538,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Aug 26 2009 Tim Waugh 1:1.4-0.rc1.20 +- Fixed admin.cgi crash when modifying a class (bug #519724, + STR #3312, patch from Jiri Popelka). + * Wed Aug 26 2009 Tim Waugh 1:1.4-0.rc1.19 - Prevent infinite loop in cupsDoIORequest when processing HTTP errors (bug #518065, bug #519663, STR #3311).