summaryrefslogtreecommitdiff
path: root/url.h
diff options
context:
space:
mode:
Diffstat (limited to 'url.h')
-rw-r--r--url.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/url.h b/url.h
index 7bfa247..b4552a7 100644
--- a/url.h
+++ b/url.h
@@ -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.