From nobody@hyperreal.com Wed Dec 4 11:55:40 1996 Received: by taz.hyperreal.com (8.8.3/V2.0) id LAA24006; Wed, 4 Dec 1996 11:55:40 -0800 (PST) Message-Id: <199612041955.LAA24006@taz.hyperreal.com> Date: Wed, 4 Dec 1996 11:55:40 -0800 (PST) From: David Bronder Reply-To: David-Bronder@uiowa.edu To: apbugs@hyperreal.com Subject: UserDir http://some.other.server/~* doesn't work X-Send-Pr-Version: 3.2 >Number: 28 >Category: mod_userdir >Synopsis: UserDir http://some.other.server/~* doesn't work >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Dec 4 12:00:03 1996 >Last-Modified: Fri Jan 23 08:08:18 PST 1998 >Originator: David-Bronder@uiowa.edu >Organization: >Release: 1.1.1, 1.2b1 >Environment: AIX 4.1.x, vendor or GNU compiler All platforms affected. >Description: When a URL of the form "http://server.two.com/~*" is given in the UserDir directive, it doesn't properly translate a URL such as http://server.one.com/~joeuser/ to http://server.two.com/~joeuser. The problem occurs because the '*' is the last character in the userdir value. When the module code looks for the '*' and points userdir to the next character, it's at the string terminator, but it's only checking for a '/'. >How-To-Repeat: >Fix: This appears to fix the problem in both 1.1.1 and 1.2b1. (This diff is for 1.2b1. The change is one line later in 1.1.1.) *** mod_userdir.c.dist Wed Dec 4 10:53:05 1996 --- mod_userdir.c Wed Dec 4 10:57:27 1996 *************** *** 142,148 **** if (strchr(userdir, '*')) x = getword(r->pool, &userdir, '*'); ! if (userdir[0] == '/') { if (x) { if (strchr(x, ':')) { redirect = pstrcat(r->pool, x, w, userdir, dname, NULL); --- 142,148 ---- if (strchr(userdir, '*')) x = getword(r->pool, &userdir, '*'); ! if ((userdir[0] == '/') || (userdir[0] == '\0')) { if (x) { if (strchr(x, ':')) { redirect = pstrcat(r->pool, x, w, userdir, dname, NULL); %0 >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: marc State-Changed-When: Fri Jan 24 21:51:07 PST 1997 State-Changed-Why: The desired effect can be achieved by adding a '/' to the end of the UserDir statement in nearly every case. I have suggested the patch be applied anyway. Responsible-Changed-From-To: gnats-admin (GNATS administrator)-marc Responsible-Changed-By: marc Responsible-Changed-When: Fri Jan 24 21:51:07 PST 1997 Responsible-Changed-Why: I'll deal with it State-Changed-From-To: analyzed-closed State-Changed-By: marc State-Changed-When: Sat Jan 25 12:22:29 PST 1997 State-Changed-Why: Fixed in revision 1.13 of mod_userdir.c which will be in 1.2b5. Responsible-Changed-From-To: marc-apache Responsible-Changed-By: coar Responsible-Changed-When: Fri Jan 23 08:08:18 PST 1998 Responsible-Changed-Why: Putting back into mainstream bugdb. %0 >Unformatted: