rpms/cups/devel cups-str3312.patch,NONE,1.1 cups.spec,1.510,1.511

Tim Waugh twaugh at fedoraproject.org
Thu Aug 27 15:36:37 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13047

Modified Files:
	cups.spec 
Added Files:
	cups-str3312.patch 
Log Message:
* Wed Aug 26 2009 Tim Waugh <twaugh at redhat.com> 1:1.4-0.rc1.20
- Fixed admin.cgi crash when modifying a class (bug #519724,
  STR #3312, patch from Jiri Popelka).


cups-str3312.patch:
 cgi-bin/admin.c             |   12 ++++++++++--
 templates/modify-class.tmpl |    1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

--- NEW FILE cups-str3312.patch ---
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 @@
 
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
 
 <TABLE>
 <TR>


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.510
retrieving revision 1.511
diff -u -p -r1.510 -r1.511
--- cups.spec	27 Aug 2009 12:40:28 -0000	1.510
+++ cups.spec	27 Aug 2009 15:36:35 -0000	1.511
@@ -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 <twaugh at redhat.com> 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 <twaugh at redhat.com> 1:1.4-0.rc1.19
 - Prevent infinite loop in cupsDoIORequest when processing HTTP
   errors (bug #518065, bug #519663, STR #3311).




More information about the scm-commits mailing list