Skip to main content

path_component

Function path_component 

Source
pub fn path_component(s: &str, label: &str) -> Result<()>
Expand description

Validate that a path component (e.g., Vault mount or role) is safe.

Rejects /, \, .., and empty strings to prevent path traversal in URL paths or file system operations.