Revoke private-channel attachment access after removal - #7565
Draft
jmecom wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Jordan Mecom <jm@squareup.com>
🔐 Codex Security Review
|
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.
Gate attachment GET/HEAD requests, including ranges and thumbnails, on current event and channel access from the primary database. Removing a member from a private channel now prevents further downloads through saved attachment URLs. This addresses the attachment issue in the report.
Reject publications that would restore access by copying an inaccessible local URL into a profile or another channel. Record successful uploads after verifying their bytes so legitimate reuploads still work. Unposted media and attachments also shared in readable events retain their existing access.
The migration indexes existing event references. Fresh-schema setup creates and verifies the same index through the existing reconciliation script. Media responses use
private, no-store; previously downloaded bytes cannot be recalled.Passed all five attachment regressions, 122 database unit tests, fresh-schema parity/reconciliation, formatting, workspace and targeted Clippy, both desktop Clippy configurations, and the file-size gate. The full unit phase of
just testpassed.just cirecorded an intermittent timeout in the unrelated ACP testblocked_recovery_write_is_bounded_and_retains_loss; it passed on subsequent runs. The broader integration suite could not start because Docker Desktop requires sign-in on this machine.