From ec5c74ad128e38eea5769c6b2245c1c07ce9d6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Mon, 10 Mar 2008 11:45:29 +0000 Subject: [PATCH] workaround #1587: require userdir.path to be set to enable mod_userdir (empty string allowed) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2120 152afb58-edef-0310-8abb-c4023f1b3aa9 --- NEWS | 1 + src/mod_userdir.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 6183cee1..7f20eff2 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,7 @@ NEWS * fix sending source of cgi script instead of 500 error if fork fails * fix min-procs handling in mod_scgi.c, just set to max-procs (patch from #623) * fix sending "408 - Timeout" instead of "410 - Gone" for timedout urls in mod_secdownload (#1440) + * workaround #1587: require userdir.path to be set to enable mod_userdir (empty string allowed) - 1.4.18 - 2007-09-09 diff --git a/src/mod_userdir.c b/src/mod_userdir.c index 83c2ded5..e664bf2a 100644 --- a/src/mod_userdir.c +++ b/src/mod_userdir.c @@ -177,6 +177,11 @@ URIHANDLER_FUNC(mod_userdir_docroot_handler) { mod_userdir_patch_connection(srv, con, p); + /* enforce the userdir.path to be set in the config, ugly fix for #1587; + * should be replaced with a clean .enabled option in 1.5 + */ + if (p->conf.path->used == 0) return HANDLER_GO_ON; + uri_len = con->uri.path->used - 1; /* /~user/foo.html -> /home/user/public_html/foo.html */