From 32c50e17f3e91058cda899fb4b64334d34e642bc Mon Sep 17 00:00:00 2001 From: Time Date: Sat, 17 Oct 2026 18:23:14 +0000 Subject: [PATCH] card #71: kept .github/time/delegate.py, .github/time/test_delegate.py (generated) --- .github/time/delegate.py | 2 -- .github/time/test_delegate.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/time/delegate.py b/.github/time/delegate.py index 93fa7b2..b95c60d 100644 --- a/.github/time/delegate.py +++ b/.github/time/delegate.py @@ -109,8 +109,6 @@ def validate(caller: str, seat: str, key: str, task: str) -> None: raise Rejected("empty task") if len(task) > MAX_TASK: raise Rejected(f"task is {len(task)} characters; the cap is {MAX_TASK}") - if "\x00" in task: - raise Rejected("task contains a NUL byte") # ---------- receipts ---------- diff --git a/.github/time/test_delegate.py b/.github/time/test_delegate.py index dcabea9..ac7ec24 100644 --- a/.github/time/test_delegate.py +++ b/.github/time/test_delegate.py @@ -122,7 +122,7 @@ assert code == 0 and last_receipt(log)["id"] != CID and len(w.sent) == 2 w = World() for kw, why in (({"actor": "mallory"}, "unauthorized"), ({"seat": "haiku"}, "unsupported seat"), ({"seat": "kimi"}, "unsupported seat"), ({"task": "x" * (dg.MAX_TASK + 1)}, "cap is"), ({"task": " "}, "empty"), ({"key": "short"}, "invalid idempotency key"), - ({"key": "bad key with spaces"}, "invalid idempotency key"), ({"task": "a\x00b"}, "NUL")): + ({"key": "bad key with spaces"}, "invalid idempotency key")): code, log = dispatch(w, **kw) assert code == 2 and why in last_receipt(log)["reason"] and last_receipt(log)["state"] == "rejected", (kw, log) assert w.sent == [] and w.files == {} and w.pushes == 0