(self, relative_path)
| 595 | return back |
| 596 | |
| 597 | def isValidRelativePath(self, relative_path): |
| 598 | if ".." in relative_path.replace("\\", "/").split("/"): |
| 599 | return False |
| 600 | elif len(relative_path) > 255: |
| 601 | return False |
| 602 | else: |
| 603 | return re.match(r"^[a-z\[\]\(\) A-Z0-9~_@=\.\+-/]+$", relative_path) |
| 604 | |
| 605 | def sanitizePath(self, inner_path): |
| 606 | return re.sub("[^a-z\[\]\(\) A-Z0-9_@=\.\+-/]", "", inner_path) |
no outgoing calls
no test coverage detected