Skip to main content

validate_path

Function validate_path 

Source
pub fn validate_path(path: String) -> String
Expand description

Validate a file path for safety.

Checks for:

  • Path traversal attempts
  • Null bytes
  • Absolute paths starting with /

Returns JSON: {"valid": true} or {"valid": false, "error": "..."}