diff options
Diffstat (limited to 'modules/generators/mod_autoindex.c')
-rw-r--r-- | modules/generators/mod_autoindex.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 28ed85a8f3..cb4460357c 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1266,8 +1266,9 @@ static struct ent *make_parent_entry(apr_int32_t autoindex_opts, if (!(p->name = ap_make_full_path(r->pool, r->uri, "../"))) { return (NULL); } - ap_getparents(p->name); - if (!*p->name) { + if (!ap_normalize_path(p->name, AP_NORMALIZE_ALLOW_RELATIVE | + AP_NORMALIZE_NOT_ABOVE_ROOT) + || p->name[0] == '\0') { return (NULL); } |