mirror of
https://github.com/apache/httpd.git
synced 2025-08-10 02:56:11 +00:00
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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100604 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user