>Number:         1687
>Category:       mod_rewrite
>Synopsis:       %{REMOTE_USER} returns empty string during 
>RewriteCond/RewriteRules evaluation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Jan 16 11:30:00 PST 1998
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.2
>Environment:
Here is the result of uname -a:
SunOS wwwserver 5.5.1 ISS_1.0 sun4d sparc SUNW,SPARCserver-1000
>Description:
I am trying to use %{REMOTE_USER} during the RewriteRule processing.
But when I attempt this set of RewriteRules:

RewriteCond     %{REMOTE_USER}  ^.*johnd
RewriteRule     ^(.*)$  http://www.apache.org/       [P,L]

This proxy is inside an AUTH_TYPE that does ask for my userid and
password, but the rewrite.log file shows this:

little.fsr.com - - [14/Jan/1998:15:30:58 -0800]
[www.some.org/sid#736d8][rid#8a3d0/initial]
(4) RewriteCond: input='' pattern='^.*johnd' => not-matched

The part of this that is preventing me from doing what I want (that is,
to make the RewriteRule based upon a userid obtained from a challenge)
not possible, is that the input=''  so the result of %{REMOTE_USER} is
empty.

I am running Apache 1.2 and I have tried this on 1.2.5 as well.

In case I have the modules compiled in the wrong order, here is the result 
of apache-server -l:
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_info.c
  mod_include.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_proxy.c
  mod_alias.c
  mod_rewrite.c
  mod_access.c
  mod_auth.c
  mod_auth_anon.c
  mod_expires.c
  mod_headers.c
  mod_usertrack.c
  mod_browser.c
>How-To-Repeat:

>Fix:
I have tried to follow the code for the setting of the value os
r->connection->user and decided that it might be faster for you
to check the code.  Sorry, I have no suggestions
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]



Reply via email to