diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/handler.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/handler.c b/src/handler.c index f3ce8ec..8534c69 100644 --- a/src/handler.c +++ b/src/handler.c @@ -44,9 +44,12 @@ static int tip_client_file_not_found(struct tip_client *cli) return -1; } -/* TODO: sanitize uri, don't escape directory serving files. */ static bool sanitize(const char *uri) { + /* TODO: smarter sanitization. */ + if (strstr(uri, "..")) + return false; + return true; } |