2.3.2: manage.cgi: Catching bad usage

From: Gregory Neil Shapiro (gshapiro+opensrs-dev@gshapiro.net)
Date: Sat Apr 07 2001 - 19:25:14 EDT


If manage.cgi is given an action of get_expire_domains without specifying a
type, the CGI would simply exit, causing heartache for the web server.

A patch:

Index: manage.cgi
===================================================================
RCS file: /usr/local/src/cvsroot/horsey.gshapiro.net/usr/local/www/retsiger.com/cgi-bin/secure/manage.cgi,v
retrieving revision 1.10
diff -u -r1.10 manage.cgi
--- manage.cgi 2001/04/07 21:36:20 1.10
+++ manage.cgi 2001/04/07 23:23:21
@@ -2179,7 +2179,7 @@
        $hauto{$hdomain[$key]} = $in{"autorenew-$hdomain[$key]"};
        $hrenew{$hdomain[$key]} = $in{"renew-$hdomain[$key]"};
     }
- if ($type eq "") { exit; };
+ if ($type eq "") { error_out("Missing type for $action"); return; };
     if ((lc $type) eq "expired") {
         $response = &do_expired_domains($page);
         $type_string = "&type=expired";



This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:36:21 EDT