1 parent d2290ca commit baaa0a5Copy full SHA for baaa0a5
1 file changed
tests/shared/test_path_security.py
@@ -142,7 +142,10 @@ def test_safe_join_rejects_symlink_escape(tmp_path: Path):
142
outside.mkdir()
143
sandbox = tmp_path / "sandbox"
144
sandbox.mkdir()
145
- (sandbox / "escape").symlink_to(outside)
+ try:
146
+ (sandbox / "escape").symlink_to(outside)
147
+ except OSError as exc: # pragma: lax no cover - depends on filesystem privileges
148
+ pytest.skip(f"symlink creation is not permitted here: {exc}")
149
150
with pytest.raises(PathEscapeError, match="escapes base"):
151
safe_join(sandbox, "escape", "secret.txt")
0 commit comments