Skip to main content

is_safe_path

Function is_safe_path 

Source
pub fn is_safe_path(base: &Path, path: &Path) -> bool
Expand description

Verifies that a given path is “Safe” and doesn’t attempt to escape the base directory.

This is a critical security check against “Path Traversal” attacks in package archives or Lua scripts.