File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,8 +70,7 @@ def valid_path(path: os.PathLike[str]) -> bool:
7070
7171 This function ensures that the file path does not contain
7272 potentially dangerous characters such as null bytes (`\x00 `)
73- or carriage returns/line feeds (`\n `, `\r `). These characters
74- can pose security risks, particularly in file handling operations.
73+ or carriage returns/line feeds (`\n `, `\r `).
7574
7675 Parameters
7776 ----------
@@ -84,11 +83,6 @@ def valid_path(path: os.PathLike[str]) -> bool:
8483 A boolean value indicating whether the path is valid
8584 (`True`) or invalid (`False`).
8685
87- Notes
88- -----
89- - This function is useful for validating file paths before performing
90- file I/O operations to prevent security vulnerabilities.
91-
9286 Examples
9387 --------
9488 >>> valid_path("/home/user/file.txt")
You can’t perform that action at this time.
0 commit comments