Implement symlink protection in static file server and add corresponding tests

This commit is contained in:
yhirose
2026-03-13 16:22:16 -04:00
parent 43a54a3e3d
commit f787f31b87
3 changed files with 101 additions and 1 deletions

View File

@@ -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