pub fn validate_path_with_env(path: &Path, env: &dyn EnvProvider) -> boolExpand description
Validate a path for security issues
§Security Checks
- No null bytes in path
- No control characters in path components
- No suspicious patterns (Windows reserved names)
- Reasonable component and total length limits
- Valid UTF-8
§Arguments
path- Path to validateenv- Environment provider for configurable limits
§Returns
true if path is safe to use, false otherwise
§Platform-Specific Behavior
This function applies cross-platform validation rules, including Windows-reserved names, even on Unix systems. This ensures consistent behavior and prevents issues when configs are shared across platforms.