diff options
-rw-r--r-- | snekbox/api/resources/eval.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/snekbox/api/resources/eval.py b/snekbox/api/resources/eval.py index 28b739d..9a53577 100644 --- a/snekbox/api/resources/eval.py +++ b/snekbox/api/resources/eval.py @@ -36,8 +36,8 @@ class EvalResource: "properties": { "path": { "type": "string", - # Disallow single absolute paths, and null bytes - "pattern": r"^[^/\\0].*", + # Disallow starting with / or containing \0 anywhere + "pattern": r"^(?!/)(?!.*\\0).*$", }, "content": {"type": "string"}, }, |