Skip to main content

Module path

Module path 

Source
Expand description

{param} substitution and *path connector-wildcard handling for capability path templates.

Functions§

encode_path_segment
Percent-encodes everything outside [A-Za-z0-9._~-], matching RFC 3986’s unreserved set for a single path segment.
substitute_path
Substitutes every {key} placeholder in template with the matching string/number/boolean field from params, and expands a trailing *path wildcard segment (validated against allowed_wildcard_prefixes).
validate_connector_path
Rejects a *path wildcard value unless it is an absolute, traversal-free path under one of allowed_prefixes. This is the only user-influenced input that reaches the controller as a raw path segment rather than a query/body value, so it gets its own defense-in-depth check on top of whatever the controller itself enforces.