diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2024-01-23 09:22:00 +0100 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2024-02-08 09:27:54 +0100 |
commit | 42f538cc66546997a166dbe67e489c9afabbb908 (patch) | |
tree | 718bb6b7161892c4b964499c1818c6d7bf0bd6a6 /browse.c | |
parent | 760031b4a74d70bdeaab4ce9aedfe772acd05bd3 (diff) |
download files
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 */ |