Skip to main content

is_inside

Function is_inside 

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

Whether key names an entry under a root: a path of plain names, none of them empty, . or .., and not starting at /.

Keys come from the manager itself, which only ever joins the names a folder listed, but an application also keeps them in files anyone can edit. A key that climbs out of the root would reach a file the manager never showed, so it is refused wherever a key becomes a path.