Expand description
Input and path validation helpers. Input validation helpers for CLI flags and paths.
Functions§
- is_
valid_ session_ name - Check if a session name is valid (alphanumeric, hyphens, and underscores only).
- reject_
path_ traversal - Reject path strings that attempt directory traversal via
..components. - reject_
path_ traversal_ str - Same as
reject_path_traversalfor stringy CLI inputs. - reject_
windows_ reserved_ basename - Reject basenames that are Windows reserved device names (
NUL,COM1, …). - sanitize_
session_ component - Convert arbitrary caller-provided text into a valid session-name component.
- session_
name_ error - Generate error message for invalid session name