export HTTP_AUTHORIZARION in mod_proxy_uwsgi

This commit is contained in:
Roberto De Ioris
2013-01-02 17:38:03 +01:00
parent 50c2fde29e
commit ed69d78a9b
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -101,6 +101,14 @@ static int uwsgi_send_headers(request_rec *r, proxy_conn_rec *conn)
ap_add_common_vars(r);
ap_add_cgi_vars(r);
// this is not a security problem (in Linux) as uWSGI destroy the env memory area readable in /proc
// and generally if you host untrusted apps in your server and allows them to read others uid /proc/<pid>
// files you have higher problems...
const char *auth = apr_table_get(r->headers_in, "Authorization");
if (auth) {
apr_table_setn(r->subprocess_env, "HTTP_AUTHORIZATION", auth);
}
const char *script_name = apr_table_get(r->subprocess_env, "SCRIPT_NAME");
const char *path_info = apr_table_get(r->subprocess_env, "PATH_INFO");
+1 -1
View File
@@ -138,7 +138,7 @@ int uwsgi_routing_func_basicauth(struct wsgi_request *wsgi_req, struct uwsgi_rou
iov[0].iov_len = 8;
}
// chec for "Basic =" string at least
// check for "Basic =" string at least
if (wsgi_req->authorization_len > 7 && ur->data2_len > 0) {
if (strncmp(wsgi_req->authorization, "Basic ", 6))
goto forbidden;