mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-04-11 19:28:30 +00:00
Implement symlink protection in static file server and add corresponding tests
This commit is contained in:
@@ -350,6 +350,11 @@ The following are built-in mappings:
|
||||
> [!WARNING]
|
||||
> These static file server methods are not thread-safe.
|
||||
|
||||
<!-- -->
|
||||
|
||||
> [!NOTE]
|
||||
> On POSIX systems, the static file server rejects requests that resolve (via symlinks) to a path outside the mounted base directory. Ensure that the served directory has appropriate permissions, as managing access to the served directory is the application developer's responsibility.
|
||||
|
||||
### File request handler
|
||||
|
||||
```cpp
|
||||
|
||||
Reference in New Issue
Block a user