Index: templates/ja/modify-class.tmpl
===================================================================
--- templates/ja/modify-class.tmpl	(revision 8790)
+++ templates/ja/modify-class.tmpl	(working copy)
@@ -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: templates/ru/modify-class.tmpl
===================================================================
--- templates/ru/modify-class.tmpl	(revision 8790)
+++ templates/ru/modify-class.tmpl	(working copy)
@@ -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: templates/modify-class.tmpl
===================================================================
--- templates/modify-class.tmpl	(revision 8790)
+++ templates/modify-class.tmpl	(working copy)
@@ -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: templates/de/modify-class.tmpl
===================================================================
--- templates/de/modify-class.tmpl	(revision 8790)
+++ templates/de/modify-class.tmpl	(working copy)
@@ -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: templates/pl/modify-class.tmpl
===================================================================
--- templates/pl/modify-class.tmpl	(revision 8790)
+++ templates/pl/modify-class.tmpl	(working copy)
@@ -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: templates/es/modify-class.tmpl
===================================================================
--- templates/es/modify-class.tmpl	(revision 8790)
+++ templates/es/modify-class.tmpl	(working copy)
@@ -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: templates/eu/modify-class.tmpl
===================================================================
--- templates/eu/modify-class.tmpl	(revision 8790)
+++ templates/eu/modify-class.tmpl	(working copy)
@@ -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: cgi-bin/admin.c
===================================================================
--- cgi-bin/admin.c	(revision 8790)
+++ cgi-bin/admin.c	(working copy)
@@ -634,6 +634,15 @@
     return;
   }
 
+  if (!name)
+  {
+    cgiStartHTML(title);
+    cgiSetVariable("ERROR", cgiText(_("Missing form variable!")));
+    cgiCopyTemplateLang("error.tmpl");
+    cgiEndHTML();
+    return;
+  }
+
   for (ptr = name; *ptr; ptr ++)
     if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' || *ptr == '#')
       break;
@@ -668,8 +677,7 @@
   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);
 
