Files
moloapp/src/runtime/static/path_guard.h
T
retoor 3c4334cec9 feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security,
data, app, realtime, supervisor, clients, CLI, example plus
enterprise tenancy, audit, operability, governance,
supplychain. Postgres via docker compose for tests.
2026-10-23 18:20:04 +02:00

17 lines
547 B
C++

// Spec: plans/01-runtime.md 6.7. Traversal guard: percent-decode, lexical
// normalize, reject NUL, backslash, and `..` escapes above root. Symlink
// policy is enforced by DiskProvider at open time.
#pragma once
#include <optional>
#include <string>
#include <string_view>
namespace molo::runtime::static_ {
// Returns the normalized in-root relative path (no leading slash), or
// nullopt when the request escapes or is malformed.
std::optional<std::string> NormalizeUrlPath(std::string_view target);
} // namespace molo::runtime::static_