mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-13 17:00:40 +00:00
Fuzz Server::handle_file_request through a mount point backed by a temporary directory that holds symlinks escaping the mount root, one of them into a sibling directory sharing its name prefix. Abort if a token stored outside the root appears in a response. The seeds are based on those of #2661. Move FuzzedStream into fuzzed_stream.h so that both server fuzzers share it, and add FuzzableServer::MarkAsRunning(), without which a server that is not listening writes no file.
25 lines
303 B
Plaintext
25 lines
303 B
Plaintext
"GET"
|
|
"HEAD"
|
|
"HTTP/1.1"
|
|
|
|
"/mnt/"
|
|
"/mnt/index.html"
|
|
"/mnt/a.txt"
|
|
"/mnt/data.bin"
|
|
"/mnt/sub/"
|
|
"/mnt/link-in.txt"
|
|
"/mnt/link-out.txt"
|
|
"/mnt/link-sibling.txt"
|
|
".."
|
|
"%2e%2e"
|
|
"%2f"
|
|
"//"
|
|
|
|
"Range: bytes=0-"
|
|
"Range: bytes=0-3,5-"
|
|
"If-None-Match: "
|
|
"W/"
|
|
"If-Modified-Since: "
|
|
"If-Range: "
|
|
"Accept-Encoding: gzip"
|