cleanup, docs

This commit is contained in:
root
2026-06-16 12:21:31 +00:00
parent dff1959341
commit ea08d5f28b
296 changed files with 1571 additions and 1940 deletions
+4 -8
View File
@@ -1,10 +1,8 @@
:title
route_path_is_safe
:sig
bool route_path_is_safe(String path)
:see
>uri
route_path_sanitize
route_path_normalize
request_query_path
@@ -15,10 +13,8 @@ Returns whether a normalized route path is safe to use as a route-derived file p
A safe route path contains only non-empty segments made from ASCII letters, digits, `_`, and `-`. The segments `.` and `..` are rejected.
```cpp
route_path_is_safe("workspace/projects"); // true
route_path_is_safe("workspace/../admin"); // false
route_path_is_safe("view.uce"); // false
```
Most request code should use runtime-populated `context.params["ROUTE_PATH"]` or `request_query_route()` instead of calling this directly.
:example
print(route_path_is_safe("docs/index") ? "safe\n" : "unsafe\n");