Return-Path: Delivered-To: apache-cvs-archive@hyperreal.org Received: (qmail 15706 invoked by uid 6000); 14 May 1998 21:58:30 -0000 Received: (qmail 15700 invoked by alias); 14 May 1998 21:58:28 -0000 Delivered-To: apache-1.3-cvs@hyperreal.org Received: (qmail 15698 invoked by uid 177); 14 May 1998 21:58:27 -0000 Date: 14 May 1998 21:58:27 -0000 Message-ID: <19980514215827.15697.qmail@hyperreal.org> From: martin@hyperreal.org To: apache-1.3-cvs@hyperreal.org Subject: cvs commit: apache-1.3/src/main http_main.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org martin 98/05/14 14:58:27 Modified: src/main http_main.c Log: Hide the password (for ftp://user:password@host/ requests) from the request list displayed by mod_status. This is analogous to the hiding in mod_log_config. Revision Changes Path 1.353 +11 -2 apache-1.3/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.352 retrieving revision 1.353 diff -u -u -r1.352 -r1.353 --- http_main.c 1998/05/13 15:20:02 1.352 +++ http_main.c 1998/05/14 21:58:26 1.353 @@ -1902,8 +1902,17 @@ conn_rec *c = r->connection; ap_cpystrn(ss->client, ap_get_remote_host(c, r->per_dir_config, REMOTE_NOLOOKUP), sizeof(ss->client)); - ap_cpystrn(ss->request, (r->the_request ? r->the_request : - "NULL"), sizeof(ss->request)); + if (r->the_request == NULL) { + ap_cpystrn(ss->request, "NULL", sizeof(ss->request)); + } else if (r->parsed_uri.password == NULL) { + ap_cpystrn(ss->request, r->the_request, sizeof(ss->request)); + } else { + /* Don't reveal the password in the server-status view */ + ap_cpystrn(ss->request, ap_pstrcat(r->pool, r->method, " ", + ap_unparse_uri_components(r->pool, &r->parsed_uri, UNP_OMITPASSWORD), + r->assbackwards ? NULL : " ", r->protocol, NULL), + sizeof(ss->request)); + } ap_cpystrn(ss->vhost, r->server->server_hostname, sizeof(ss->vhost)); } #endif