www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Stevens <vxspiri...@hotmail.com>
Subject general/5947: Apache not reporting $ENV{'REMOTE_USER'}
Date Fri, 31 Mar 2000 22:33:38 GMT

>Number:         5947
>Category:       general
>Synopsis:       Apache not reporting $ENV{'REMOTE_USER'}
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Mar 31 14:40:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     vxspiritxv@hotmail.com
>Release:        1.3.9
>Organization:
apache
>Environment:
Linux server 2.2.14 #5 SMP Mon Feb 28 22:07:50 PST 2000 i586 unknown
Slackware7
>Description:
When in a directory protected by .htaccess password protection going to a cgi via `http://blah/cgi-bin/blah.cgi`
$ENV{'REMOTE_USER'} is returned correctly, but using <form method="POST" action="blah.cgi"
ENCTYPE="multipart/form-data"> $ENV{'REMOTE_USER'} doesn't return anything.
>How-To-Repeat:
/cgi-bin/protected/.htaccess
 AuthType Basic
 AuthName "Protected Pages"
 AuthUserFile /.htpasswd
 <LIMIT GET>
 require valid-user
 </LIMIT>

/cgi-bin/protected/blah.cgi
 #!/usr/bin/perl
 print "Content-type: text/html\n\n";
 $currentuser = $ENV{'REMOTE_USER'};
 if ($currentuser eq "") {
  print "Where did your user name go?";
 } else {
  print "your user name is: $currentuser";
 }

/formfile.html
 <html><body><form method="POST" action="cgi-bin/blah.cgi" ENCTYPE="multipart/form-data">
 <input type="text" name="blah"><br>
 <input type="submit" value="Send">
 </form>
 </body></html>


say you use the user name foo in /.htpasswd
access http://blah/cgi-bin/protected/blah.cgi
you should get 'your user name is: foo'
but using /html/formfile.html
you should get 'Where did your user name go?'
>Fix:
nope
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message