open-standards/wai/http-conformance/falsify/chain-parent-unchecked.patch

18 lines
903 B
Diff

# must fail: live_edge_unchained live_edge_skip live_edge_other_key_walked
# a live revision's parent links not walked (playlist_receipt::LiveChain::advance)
diff --git a/wai/wai-rs/src/http_binding/playlist_receipt.rs b/wai/wai-rs/src/http_binding/playlist_receipt.rs
index 6fb6141d..db167d4c 100644
--- a/wai/wai-rs/src/http_binding/playlist_receipt.rs
+++ b/wai/wai-rs/src/http_binding/playlist_receipt.rs
@@ -228,9 +228,9 @@ impl LiveChain {
let mut link = cur.parent_receipt_hash;
loop {
let l = match link {
- None => return Err(ReceiptError::Unchained),
+ None => break,
Some(l) if l == target => break,
- Some(l) => l,
+ Some(_) => break,
};
if walked.len() == self.bound {
// §8.6: past the bound, a revision ahead of the head (more segments