Eighteen patches, each breaking one function of the playlist side and naming the cases that must fail: adjacency (another program date-time, a larger discontinuity sequence), rendering (parts after EXTINF, layer lines after the URI), bandwidth rounding, duration rounding, a delta update read, the session-data line before #EXTM3U, the render digest left out of the signed payload, a receipt under another name, an unchecked parent, the open segment's parts not read for cids, the integer log without interpolation, a waiting utility rule, a look-ahead blind to stalls, an unlabelled figure taken as zero, per-layer bytes as a depth's, and size-blind entry order. falsify/run.sh builds with http and video_manifest and runs the eleven new Python mutations. A depth case at 150 kb/s sits between layer boundaries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
15 lines
975 B
Diff
15 lines
975 B
Diff
# must fail: playlist_receipt_name
|
|
# a receipt file accepted under another name (playlist_receipt::check_playlist)
|
|
diff --git a/wai/wai-rs/src/http_binding/playlist_receipt.rs b/wai/wai-rs/src/http_binding/playlist_receipt.rs
|
|
index a42d4379..5dedec6e 100644
|
|
--- a/wai/wai-rs/src/http_binding/playlist_receipt.rs
|
|
+++ b/wai/wai-rs/src/http_binding/playlist_receipt.rs
|
|
@@ -101,7 +101,7 @@ pub fn seal_playlist(
|
|
pub fn check_playlist(playlist: &[u8], receipt: &[u8], name: Option<&str>) -> Result<ManifestReceipt, ReceiptError> {
|
|
let text = std::str::from_utf8(receipt).map_err(|_| ReceiptError::Malformed("not UTF-8".into()))?;
|
|
let r = ManifestReceipt::from_json(text).map_err(ReceiptError::Malformed)?;
|
|
- if name.is_some_and(|n| n != r.receipt_file_name()) {
|
|
+ if name.is_some_and(|n| n.is_empty()) {
|
|
return Err(ReceiptError::NameMismatch);
|
|
}
|
|
if *blake3::hash(playlist).as_bytes() != r.manifest_hash || r.rendered().as_bytes() != playlist {
|