]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Remember an authenticated user during internal redirects if the
authorAndré Malo <nd@apache.org>
Wed, 23 Jul 2003 21:53:42 +0000 (21:53 +0000)
committerAndré Malo <nd@apache.org>
Wed, 23 Jul 2003 21:53:42 +0000 (21:53 +0000)
redirection target is not access protected and pass it
to scripts using the REDIRECT_REMOTE_USER environment variable.

PR: 10678, 11602.
Reviewed by: Jeff Trawick, Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@100751 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/util_script.c
support/suexec.c

diff --git a/CHANGES b/CHANGES
index 1a1d8d466063bf02b60b3bf5645705611784cdfc..7ecf00682e36394c691ef4a9ed792915f108940f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.48
 
+  *) Remember an authenticated user during internal redirects if the
+     redirection target is not access protected and pass it
+     to scripts using the REDIRECT_REMOTE_USER environment variable.
+     PR 10678, 11602.  [André Malo]
+
   *) mod_include: Fix a trio of bugs that would cause various unusual
      sequences of parsed bytes to omit portions of the output stream.
      PR 21095. [Ron Park <ronald.park@cnet.com>, André Malo, Cliff Woolley]
diff --git a/STATUS b/STATUS
index 601db4cc94165a2e9fce105ab31c92920897259f..296b84749472b393294ecc1b14905b73fc5d62ad 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2003/07/23 20:28:26 $]
+Last modified at [$Date: 2003/07/23 21:53:41 $]
 
 Release:
 
@@ -276,12 +276,6 @@ PATCHES TO PORT FROM 2.1
         modules/ssl/ssl_engine_vars.c:  r1.24
       +1: trawick, nd
 
-    * pass REDIRECT_REMOTE_USER to the script if REMOTE_USER doesn't
-      exist and the original request is protected.
-        server/util_script.c: r1.82
-        support/suexec.c: r1.27
-      +1: nd, trawick, jerenkrantz
-
     * use the appropriate folder icon, even if there's a directoryindex
       listed file in the particular folder. PR 9587
         modules/generators/mod_autoindex.c r1.120
index b33873eb7ef4e47ce90bacaaf82723b79e8d5a6f..dd7d9ce416823d118131c4b2a332d88588a422f0 100644 (file)
@@ -286,6 +286,17 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
     if (r->user) {
        apr_table_addn(e, "REMOTE_USER", r->user);
     }
+    else if (r->prev) {
+        request_rec *back = r->prev;
+
+        while (back) {
+            if (back->user) {
+                apr_table_addn(e, "REDIRECT_REMOTE_USER", back->user);
+                break;
+            }
+            back = back->prev;
+        }
+    }
     if (r->ap_auth_type) {
        apr_table_addn(e, "AUTH_TYPE", r->ap_auth_type);
     }
index 1976cdfc62f73299124b3cd7ee2a811d8b3fdd07..53e0da7d7de4b56a3e7395a1cffa4417226bf532 100644 (file)
@@ -159,6 +159,7 @@ char *safe_env_lst[] =
     "REMOTE_PORT=",
     "REMOTE_USER=",
     "REDIRECT_QUERY_STRING=",
+    "REDIRECT_REMOTE_USER=",
     "REDIRECT_STATUS=",
     "REDIRECT_URL=",
     "REQUEST_METHOD=",