Skip to main content

normalize

Function normalize 

Source
pub fn normalize(path: &str) -> Result<String>
Expand description

Reject a path that would escape the storage root.

Paths often come from user input — an upload’s filename, a key in a request — so this runs before every operation rather than at the edges.