Skip to content

Commit

Permalink
Restrict path characters to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Feb 23, 2024
1 parent 0faaa84 commit ec3ff5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snakebids/tests/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def paths(
absolute: bool | None = None,
resolve: bool = False,
) -> st.SearchStrategy[Path]:
valid_chars = st.characters(blacklist_characters=["/", "\x00"])
valid_chars = st.characters(blacklist_characters=["/", "\x00"], codec="UTF-8")
paths = st.lists(
st.text(valid_chars), min_size=min_segments, max_size=max_segments
).map(lambda x: Path(*x))
Expand Down

0 comments on commit ec3ff5f

Please sign in to comment.