This also re-enables the upstream apacheScriptAlias handling that was
previously disabled for no good reason (we don’t use it, but its
existence isn’t harmful), and fixes the same problem in it. The patch
has been sent upstream to http://bugs.debian.org/589461 .
git-svn-id: svn://scripts.mit.edu/trunk@1589
db9d59ff-b01e-0410-9b1a-
cd9a8c06840f
int sleep1 = 1;
int sleep;
struct berval hostnamebv, shostnamebv;
int sleep1 = 1;
int sleep;
struct berval hostnamebv, shostnamebv;
reqc =
(mod_vhost_ldap_request_t *)apr_pcalloc(r->pool, sizeof(mod_vhost_ldap_request_t));
reqc =
(mod_vhost_ldap_request_t *)apr_pcalloc(r->pool, sizeof(mod_vhost_ldap_request_t));
if (reqc->cgiroot) {
cgi = strstr(r->uri, "cgi-bin/");
if (cgi && (cgi != r->uri + strspn(r->uri, "/"))) {
if (reqc->cgiroot) {
cgi = strstr(r->uri, "cgi-bin/");
if (cgi && (cgi != r->uri + strspn(r->uri, "/"))) {
r->filename = cgi;
r->handler = "cgi-script";
apr_table_setn(r->notes, "alias-forced-type", r->handler);
r->filename = cgi;
r->handler = "cgi-script";
apr_table_setn(r->notes, "alias-forced-type", r->handler);
-#endif
- /* This is a quick, dirty hack. I should be shot for taking 6.170
- * this term and being willing to write a quick, dirty hack. */
-
- if (strncmp(r->uri, "/~", 2) == 0) {
+ } else if (strncmp(r->uri, "/~", 2) == 0) {
+ /* This is a quick, dirty hack. I should be shot for taking 6.170
+ * this term and being willing to write a quick, dirty hack. */
char *username;
uid_t uid = (uid_t)atoll(reqc->uid);
if (apr_uid_name_get(&username, uid, r->pool) != APR_SUCCESS) {
char *username;
uid_t uid = (uid_t)atoll(reqc->uid);
if (apr_uid_name_get(&username, uid, r->pool) != APR_SUCCESS) {
return DECLINED;
}
r->filename = apr_pstrcat(r->pool, homedir, "/", USERDIR, r->uri + 2 + strlen(username), NULL);
return DECLINED;
}
r->filename = apr_pstrcat(r->pool, homedir, "/", USERDIR, r->uri + 2 + strlen(username), NULL);
}
} else if (r->uri[0] == '/') {
/* we don't set r->filename here, and let other modules do it
}
} else if (r->uri[0] == '/') {
/* we don't set r->filename here, and let other modules do it
}
/* Hack to allow post-processing by other modules (mod_rewrite, mod_alias) */
}
/* Hack to allow post-processing by other modules (mod_rewrite, mod_alias) */
}
#ifdef HAVE_UNIX_SUEXEC
}
#ifdef HAVE_UNIX_SUEXEC