diff options
Diffstat (limited to 'browse.c')
-rw-r--r-- | browse.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -71,7 +71,7 @@ build_browse_url(struct kreq * r, struct file * file) "browse: action URL overflow: %s", action_url); return 0; } - file->action_url = v_strcpy(action_url, action_url_len); + file->action_url = strndup(action_url, action_url_len); if (file->action_url == NULL) { kutil_warn(r, NULL, "browse: unable to allocate file url buffer: %s", @@ -188,7 +188,7 @@ browse(struct kreq * r) struct template_data data; /* check that the requested URL can be safely processed */ - if (!check_request_path(r->path)) + if (!check_request_path(r->path, r->suffix)) http_exit(r, KHTTP_400, "browse: Invalid request path"); /* list requested directory content */ |