Repository navigation
fix(download): minimally restore path-authorized ZIP tickets - #46
Merged
Merged
Conversation
The native ZIP ticket validation ran for every library and required a parent_dir plus a non-empty username, so it rejected payloads that are part of the existing contract: the CE download-dir ticket has only obj_id/dir_name, the public folder-share multi ticket is minted with an empty username, SeaDoc's image export uses a display-name alias, and multi-level selections use relative 'dir/file' entries. That broke tests/test_file_operation/test_zip_download.py and turned previously working downloads into 500s. Only an ACL-protected repository needs the ticket itself to carry the path proof: issue_access_token() already refuses unbound tickets there, and the redemption guard still refuses them if ACL rows appear later. Unprotected libraries keep the native unbound ticket. Nested relative selections are accepted and checked per resolved entry, matching the native contract and the Go archiver. Extend the token-manager harness with the unprotected-library contract, nested selections and the rejected entry shapes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DEV ZIP creation fails with
Path-qualified authorization required: the existing ZIP RPC issues unbound native tickets even when this operation needs path authority.This PR is limited to that ticket compatibility gap:
Final diff: 2 implementation files and one existing Go test file (133 additions, 1 deletion). No new RPC, schema, configuration, background tasks, Hub/Etech changes or test framework. Archive streaming/error handling is outside this PR; the previously added stream-abort change and large native/archive test harnesses have been removed from the diff.
Validation for this revision:
Linux integration status remains unresolved, so keep this PR Draft. On the preceding revision ea5a90e, run 40301891244 compiled C/Go and passed the first Go-fileserver test phase (103 passed, 9 skipped, 191 subtests, including the native ZIP test). Its second C-fileserver phase failed during initialization with a missing RPC socket; the separate checks job also hits the known cloudfile-docker tool-path mismatch. Neither quick CI nor the local probes prove complete Linux/DEV acceptance. No merge, deployment or environment mutation has been performed.
Minimal CI repair (c52830e)
cloudfile-docker/tools/gates/.