Skip to main content

is_valid_key

Function is_valid_key 

Source
pub fn is_valid_key(key: &str) -> bool
Expand description

Whether key is safe to use as a single path component under HOST_ROOT. Deliberately narrow: alphanumerics plus ., -, _, non-empty, length-capped, and never a bare ./... Everything a dispatcher derives passes; nothing a hostile spec could write escapes.