Repository navigation
fix(content): 未附修订签名时拒绝客户端 revision_id/content_created_at - #152
Merged
Merged
Conversation
A client-chosen revision_id or content_created_at is only meaningful as part of the signed Revision manifest. Unsigned writes that carried them were accepted with an unproven ID/time; a signature without revision_id could never verify. Refs #79. Co-authored-by: Cursor <cursoragent@cursor.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
本地全量测试(head bba4e6b)
|
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.
摘要
对应 #79(内容/文件编辑与 Revision 完整契约)中的一个单点校验。本 PR 不关闭 #79,只是其中一个切片。
revise_resource之前的行为:revision_id或content_created_at,但没有content_signature,写入仍会被接受:客户端选定的 Revision ID 直接落库,content_created_at被静默丢弃,响应看起来和签名写入一样成功。content_signature却没有revision_id,服务端会生成随机 ID,签名必然验不过,最后只返回一个笼统的invalid_signature。这些字段只有作为签名 Revision manifest 的一部分时才有定义(见
client_content.signed_patch_arguments,以及identity.*_put@2要求同时提供)。现在:revision_id或content_created_at:拒绝,返回content_signature_required。revision_id:拒绝,返回revision_id_required。transfer.seal)不携带客户端参数,照常工作。覆盖范围是所有经过
revise_resource的客户端写入:content.post_create/post_write/post_edit/post_rollback、content.post_patch@2、content.text_patch@3、content.text_patch_batch@2、discussion.reply/quote/repost。范围边界
EffectWorker._retry),队列容量由 fix: cap shared storage and extend deny-only recovery #143 的require_webhook_capacity覆盖,没有发现另一条无界路径,所以本 PR 不涉及 真实 HTTPS Webhook 的投递、丢 ACK、重试与恢复验证 #81。测试
tests/issue_78_80/test_revision_signature_fields.py:修复前 5 个失败,修复后全部通过。tests/issue_78_80、test_personal_content_signatures、test_personal_documents、test_custodial_vault、test_custodial_upgrade、test_legacy_directive、test_notes_todos、test_transfer:129 passed。Made with Cursor