diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2025-01-23 23:21:44 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2025-01-23 23:37:39 +0100 |
| commit | 9752843329a257542c34798d65e829a6cff7764b (patch) | |
| tree | b834d2d3dd4c27cae03f3d2c663644ecae3d1a8d /page.h | |
| parent | 5c4e226ddcd132c0dfa9a9cf096d3b3f8fc3c171 (diff) | |
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.
Diffstat (limited to 'page.h')
| -rw-r--r-- | page.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -42,6 +42,7 @@ int page_style(struct http_response *r, const char *path); int page_failed_login(struct http_response *r); int page_forbidden(struct http_response *r); int page_bad_request(struct http_response *r); +int page_not_found(struct http_response *r); int page_resource(const struct page_resource *r); int page_head_resource(struct http_response *r, const char *res); int page_public(struct http_response *r, const char *res); |
