From: pallo Date: Tue, 24 Oct 2000 13:05:51 +0000 (+0000) Subject: Made sure nobody tries to run conf.pl as a CGI-script. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=d595e32ed4150b609f54121daf1de3489de94fc6;hp=f9b3e5d9902a047bfa8995c1d795cae2226a857a Made sure nobody tries to run conf.pl as a CGI-script. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@820 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/config/conf.pl b/config/conf.pl index b118f71e..0be31cf7 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -6,6 +6,16 @@ ############################################################ $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... ############################################################