parent
324fdcfd58
commit
97fc159ff1
|
@ -44,9 +44,12 @@ static int tip_client_file_not_found(struct tip_client *cli)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: sanitize uri, don't escape directory serving files. */
|
|
||||||
static bool sanitize(const char *uri)
|
static bool sanitize(const char *uri)
|
||||||
{
|
{
|
||||||
|
/* TODO: smarter sanitization. */
|
||||||
|
if (strstr(uri, ".."))
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue