Skip to content

Reject NUL-bearing filenames in research exports - #6687

Open
josecarlosgonzalezroque-design wants to merge 1 commit into
CrocSwap:mainfrom
josecarlosgonzalezroque-design:fix/export-nul-paths
Open

josecarlosgonzalezroque-design wants to merge 1 commit into
CrocSwap:mainfrom
josecarlosgonzalezroque-design:fix/export-nul-paths

Conversation

@josecarlosgonzalezroque-design

Copy link
Copy Markdown
Contributor

Change and mathematical scope

The offline checker accepted self-consistent PAX archives with NUL-bearing filenames, including with --check-inputs, then extraction failed with ValueError: embedded null character. Reject NUL at the shared export-specific path boundary and report the escaped filename.

The regression constructs PAX headers independently of the exporter: four NUL positions are checked through both public CLI modes with Git absent from PATH. Positive controls retain Unicode, CR/LF/CRLF filenames and binary payloads containing NUL; a producer-side control rejects invalid declarations before tree inventory. Existing hashes, modes, input coverage and publication checks remain intact. No mathematical result, new kappa or selected-frontier change is claimed.

Task and overlap

Started from canonical main 7c49fe32c55de02c2c873655c804b16e4c3fef0a; the pre-publication fetch on November 3 at approximately 19:48 UTC found the same head. Priority revision 8; portable-replay, scope key 91a9a2afec282c926282, using the verifier-engineering expertise override. Scope is changed from the compressed-payload example to this demonstrated filename defect.

The review note records exact source hashes, handoff-first orientation, bounded overlap checks, environment setup, evidence and next checks. Nick Petalas's open #6204 changes archive-index reuse in the same checker; this is a complementary path rejection. Local sparse/discussion coverage is partial, not a novelty certificate.

Validation

Windows 11 build 26300, CPython 3.12.10, Git 2.53.0.windows.3:

python -W error -B -m unittest discover -s tests -p 'test_research_export*.py' -v
python -I -O -W error -B tests/test_research_export_nul_paths.py -v
python -B scripts/research_selected_baseline.py
git diff --cached --check

All 45 export tests pass without skips, and all three new tests pass under isolated optimized Python. Before the fix, all eight CLI rejection cases falsely printed success. The selected binding-only baseline passes. Published tree 1d11919446ca34733294b7c7385e39c9d9d2bed7 exactly matches the tested local tree.

POSIX execution, hosted CI success, historical scientific replay and full theorem verification are unclaimed. This narrow guard does not promise extraction of every accepted POSIX name on every platform.

Credit

Credit Tekalign, roger-sato, Ali Romman, Mihir Srivastava, Nick Petalas, Douglas Colkitt and the retained exporter/Git-reader contributors. Prepared for josecarlosgonzalezroque-design with substantial OpenAI Codex assistance, one agent. Apache-2.0; author-checked evidence.

Open next questions

Run the new small, Git-free test module on POSIX and another supported Python version. The review note gives the exact scope and first step; no mathematical replay is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant