Commit graph

15 commits

Author SHA1 Message Date
Julian Stirling
fe409ccefb Allow dots within filepaths if not trailing. 2026-06-02 14:43:03 +01:00
Beth Probert
6d66dd0ed8 Change make_path_safe to is_path_safe and update tests to reflect this 2026-03-09 15:45:32 +00:00
Beth Probert
3776828699 Fix final typo 2026-03-09 14:52:23 +00:00
Beth Probert
ada7585706 Fix typos 2026-03-09 14:40:51 +00:00
Beth Probert
b1d47c8aae Add final test case for path checking 2026-03-09 14:09:00 +00:00
Beth Probert
968237bec0 Ruff checks 2026-03-09 14:02:15 +00:00
Beth Probert
f67699fbc8 Raise warnings if there are unsafe file path elements rather than coercing file paths. Stitching still raises an error if your file name is unsafe 2026-03-09 13:54:43 +00:00
Beth Probert
2c2f97cb56 Force file names to be lower case to avoid Windows issues around case sensitivity when checking if a file already exists. Path names can be uppercase as these will be defined on a users system and pre-exist. Files are created by us so we can force sanitation 2026-03-06 15:37:01 +00:00
Beth Probert
4395d4001c Allow relative imports with two dots at start of path. Update unit tests. 2026-03-06 14:13:00 +00:00
Beth Probert
e5429d6cda Change make_path_safe to allow single dot relative imports, but no dots anywhere else. Added new unit tests for this. 2026-03-06 14:07:07 +00:00
Beth Probert
713df248ff Add underscores to fix unit test 2026-03-06 09:53:41 +00:00
Beth Probert
7a17c92d3e Apply suggestions from code review of branch 523-improve-validation-checks
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
2026-03-05 15:13:42 +00:00
Beth Probert
f52ce85b3e Ruff formatting 2026-03-05 14:04:33 +00:00
Beth Probert
35efba19b8 Use pytest parametrize for better coverage of forbidden commands and reserved names 2026-03-05 13:55:05 +00:00
Beth Probert
98e71207c5 Add forbidden windows commands to stitching and utilities to check for file name sanitation. Unit tests also added 2026-03-05 13:03:17 +00:00