diff options
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. |