diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-17 18:10:02 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-19 17:49:54 +0200 |
commit | 7caf4597bcfb64dac04b7190dab1022f1bc4e141 (patch) | |
tree | e754d4e5bd0799dcac12ea3dc77e2f8a7b10ed54 /url.h | |
parent | 1970c9982e99daa26f7fc4c6f16b441a0aa806de (diff) |
file download poc
Diffstat (limited to 'url.h')
-rw-r--r-- | url.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -31,8 +31,19 @@ #ifndef URL_H #define URL_H +#include <stdbool.h> #include <stdio.h> +#define URL_LENGTH_MAX 8192 + +/* + * Checks that the path can be safely processed. Namely, it should not contain + * "..", which denotes an attempt to get out of the DATA_DIR root folder. + * The path is required. + */ +bool +check_request_path(char *); + /* * Build an URL from the provided components. * The first argument is the destination buffer where the URL will be written. |