Validates that a caller-supplied identifier is a safe single path segment and cannot traverse directories.
This is a lexical check on the string only. It does not resolve symlinks and is not a sandbox.
The caller-supplied identifier. Non-string values are rejected.
Human-readable field name used in error messages.
If value is not a non-empty string, or if it contains a null byte, a path separator, a drive prefix, or is . or ...
value
.
..
Validates that a caller-supplied identifier is a safe single path segment and cannot traverse directories.
This is a lexical check on the string only. It does not resolve symlinks and is not a sandbox.