Made sure nobody tries to run conf.pl as a CGI-script.
authorpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 24 Oct 2000 13:05:51 +0000 (13:05 +0000)
committerpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 24 Oct 2000 13:05:51 +0000 (13:05 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@820 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/conf.pl

index b118f71e4e41512ef92a8a5a453726a950e4cddf..0be31cf70d14266a5a83f7f23570be3ad16817f4 100755 (executable)
@@ -6,6 +6,16 @@
 ############################################################              
 $conf_pl_version = "x62";
 
 ############################################################              
 $conf_pl_version = "x62";
 
+############################################################              
+# Some people try to run this as a CGI. That's wrong!
+############################################################              
+if(defined($ENV{'PATH_INFO'}) || defined($ENV{'QUERY_STRING'}) ||
+   defined($ENV{'REQUEST_METHOD'})) {
+   print "Content-Type: text/html\n\n";
+   print "You must run this script from the command line.";
+   exit;
+}
+
 ############################################################              
 # First, lets read in the data already in there...
 ############################################################              
 ############################################################              
 # First, lets read in the data already in there...
 ############################################################