From 50652463a99eac34dc89d85569d6d0d3e74e8316 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sat, 17 Mar 2007 00:06:37 +0000 Subject: Moving from HTTP_USER_AGENT to GATEWAY_INTRFACE where appropriate git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@920 4979c152-3d1c-0410-bac9-87ea11338e46 --- menu.pl | 4 ++-- net-setup.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/menu.pl b/menu.pl index e54fdd2d..e6a0073a 100755 --- a/menu.pl +++ b/menu.pl @@ -156,7 +156,7 @@ sub check_password { if ($form->{password}) { if (! Session::password_check($form, $form->{login}, $form->{password})) { - if ($ENV{HTTP_USER_AGENT}) { + if ($ENV{GATEWAY_INTERFACE}) { &getpassword; } else { $form->error(__FILE__.':'.__LINE__.': '.$locale->text('Access Denied!')); @@ -167,7 +167,7 @@ sub check_password { } } else { - if ($ENV{HTTP_USER_AGENT}) { + if ($ENV{GATEWAY_INTERFACE}) { $ENV{HTTP_COOKIE} =~ s/;\s*/;/g; @cookies = split /;/, $ENV{HTTP_COOKIE}; foreach (@cookies) { diff --git a/net-setup.pl b/net-setup.pl index 4b70aec0..594847e8 100755 --- a/net-setup.pl +++ b/net-setup.pl @@ -33,10 +33,10 @@ if (!$@){ $| = 1; -#not sure how safe this is. If the browser sends a blank HTTP_USER_AGENT +#not sure how safe this is. If the browser sends a blank GATEWAY_INTERFACE #will this script destroy part of the install? #This script should probably be made inaccessible via HTTP until this feature is working -if (($ENV{HTTP_USER_AGENT})||($ENV{HTTP_HOST})) { +if (($ENV{GATEWAY_INTERFACE})||($ENV{HTTP_HOST})) { print "Content-type: text/html\n\nThis does not work yet! use $0 from the command line"; exit; } -- cgit v1.2.3