Shared video range probe returns 404 after a viewer Share (#1122) #1358

Open
opened 2026-10-07 14:00:32 +00:00 by kayg · 2 comments
Owner

Found during merge round #1122 on head 95b1ea5724, against the combined local server.

The unchanged isolation probe in tests/adversarial/attack2.py:1303 uploads AShared/shared.mp4 through Files, gets its Item ID from Files entries, grants a viewer Share to User B, then B requests /api/v1/video/{item_id}/source with Range: bytes=0-3.

Expected: status 206 and the first four source bytes. Observed:

!! shared video playback: expected 206, got 404 b'{"error":{"code":"not_found","message":"video not found"}}'
!! shared video playback: returned unexpected bytes b'{"error":{"code":"no'

This is non-SLOW and remains unresolved. No assertion was changed. The fixture contains synthetic bytes rather than a decoded video; determine whether Video source MIME validation or Share lookup causes the discrepancy before changing any expectation. No access leak or server crash was observed in this probe. Track as playback/fixture consistency, not a demonstrated authorization bypass.

Found during merge round #1122 on head 95b1ea5724fa9e35f92de0fec624aa20df51da61, against the combined local server. The unchanged isolation probe in tests/adversarial/attack2.py:1303 uploads AShared/shared.mp4 through Files, gets its Item ID from Files entries, grants a viewer Share to User B, then B requests /api/v1/video/{item_id}/source with Range: bytes=0-3. Expected: status 206 and the first four source bytes. Observed: ```text !! shared video playback: expected 206, got 404 b'{"error":{"code":"not_found","message":"video not found"}}' !! shared video playback: returned unexpected bytes b'{"error":{"code":"no' ``` This is non-SLOW and remains unresolved. No assertion was changed. The fixture contains synthetic bytes rather than a decoded video; determine whether Video source MIME validation or Share lookup causes the discrepancy before changing any expectation. No access leak or server crash was observed in this probe. Track as playback/fixture consistency, not a demonstrated authorization bypass.
Author
Owner

Evidence for #1358 on origin/dev / production 0419170fe: the original plain-text .mp4 fixture returns the same 404 as in merge round 33. This is not introduced by this round. Video requires a content-sniffed video MIME type on both revisions.

The replay now reuses crates/plugins/files/tests/fixtures/media/source-generated.mp4, the existing two-frame decodable MP4. The 206 assertion and exact-byte assertion are unchanged. Added explicit non-recipient/missing-item equivalence. Verbatim output on production:

VIDEO_SHARE recipient=206 bytes_match=True non_recipient=404 missing=404 denial_equal=True
server alive at end: True

==== ROUND 2 FINDINGS 0

==== ROUND 2 SLOW 0

Host load: 66.69, 52.84, 43.50. The real video also exposed an assumption in the Photos fixture: it chose the first owner media Item, which can be the video outside the Photos Share, rather than the uploaded share-probe.jpg. The probe now waits for that exact JPEG; every original denial, scope, recipient and revoke assertion remains. A replay with this fixture correction has zero findings. The fresh production release build and the combined release round remain in progress.

Evidence for #1358 on origin/dev / production 0419170fe: the original plain-text .mp4 fixture returns the same 404 as in merge round 33. This is not introduced by this round. Video requires a content-sniffed video MIME type on both revisions. The replay now reuses crates/plugins/files/tests/fixtures/media/source-generated.mp4, the existing two-frame decodable MP4. The 206 assertion and exact-byte assertion are unchanged. Added explicit non-recipient/missing-item equivalence. Verbatim output on production: ```text VIDEO_SHARE recipient=206 bytes_match=True non_recipient=404 missing=404 denial_equal=True server alive at end: True ==== ROUND 2 FINDINGS 0 ==== ROUND 2 SLOW 0 ``` Host load: 66.69, 52.84, 43.50. The real video also exposed an assumption in the Photos fixture: it chose the first owner media Item, which can be the video outside the Photos Share, rather than the uploaded share-probe.jpg. The probe now waits for that exact JPEG; every original denial, scope, recipient and revoke assertion remains. A replay with this fixture correction has zero findings. The fresh production release build and the combined release round remain in progress.
Author
Owner

Fresh production proof: built origin/dev at 0419170fe4 in a detached worktree. The first build needed the production frontend assets for RustEmbed; after using the existing assets from the same revision, the release build completed:

    Finished `release` profile [optimized] target(s) in 20m 08s

The built binary was copied before the combined build. The fresh video-only replay exited 0, at host load 63.41, 65.68, 61.04. Output, verbatim:


VIDEO_SHARE recipient=206 bytes_match=True non_recipient=404 missing=404 denial_equal=True
server alive at end: True

==== ROUND 2 FINDINGS 0

==== ROUND 2 SLOW 0

The earlier fresh replay of isolation plus preview completed its assertions with FINDINGS 0 / SLOW 9, but its 600-second wrapper expired during cleanup (exit 124). This focused replay keeps that result separate. The preview-only check previously completed FINDINGS 0 / SLOW 0 at load 53.36, 46.34, 37.22. No server authorization behavior was relaxed.

Fresh production proof: built origin/dev at 0419170fe456b58614befcb12d9c9d255118f1c0 in a detached worktree. The first build needed the production frontend assets for RustEmbed; after using the existing assets from the same revision, the release build completed: ``` Finished `release` profile [optimized] target(s) in 20m 08s ``` The built binary was copied before the combined build. The fresh video-only replay exited 0, at host load 63.41, 65.68, 61.04. Output, verbatim: ``` VIDEO_SHARE recipient=206 bytes_match=True non_recipient=404 missing=404 denial_equal=True server alive at end: True ==== ROUND 2 FINDINGS 0 ==== ROUND 2 SLOW 0 ``` The earlier fresh replay of isolation plus preview completed its assertions with FINDINGS 0 / SLOW 9, but its 600-second wrapper expired during cleanup (exit 124). This focused replay keeps that result separate. The preview-only check previously completed FINDINGS 0 / SLOW 0 at load 53.36, 46.34, 37.22. No server authorization behavior was relaxed.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1358
No description provided.