From 9752843329a257542c34798d65e829a6cff7764b Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Thu, 23 Jan 2025 23:21:44 +0100 Subject: main.c: Forbid sharing non-existing files So far, slcl would allow to share literally any directory or file, even if they did not exist, as long as valid credentials were given. Now, directories cannot be shared, since this is already restricted by the web interface. This is now considered an invalid request. On the other hand, attempting to share non-existing files shall now return a 404 Not Found response to the user. --- page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'page.c') diff --git a/page.c b/page.c index 0d15473..c103f4a 100644 --- a/page.c +++ b/page.c @@ -1626,7 +1626,7 @@ end: return ret; } -static int page_not_found(struct http_response *const r) +int page_not_found(struct http_response *const r) { static const char body[] = DOCTYPE_TAG -- cgit v1.2.3