From 98f5f5897564dbf429a48cbe09b10330a0335f50 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:05:37 +0000 Subject: [PATCH] Permit the snapshots/status_cache file to be sparse (#15713) (cherry picked from commit 1e2f5a5f55a7a72543da605bbac883f151b26845) Co-authored-by: Michael Vines --- runtime/src/hardened_unpack.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/src/hardened_unpack.rs b/runtime/src/hardened_unpack.rs index d35d33db8a..38fcd17855 100644 --- a/runtime/src/hardened_unpack.rs +++ b/runtime/src/hardened_unpack.rs @@ -206,7 +206,9 @@ fn is_valid_snapshot_archive_entry(parts: &[&str], kind: tar::EntryType) -> bool (["accounts", file], GNUSparse) if like_storage(file) => true, (["accounts", file], Regular) if like_storage(file) => true, (["snapshots"], Directory) => true, + (["snapshots", "status_cache"], GNUSparse) => true, (["snapshots", "status_cache"], Regular) => true, + (["snapshots", dir, file], GNUSparse) if all_digits(dir) && all_digits(file) => true, (["snapshots", dir, file], Regular) if all_digits(dir) && all_digits(file) => true, (["snapshots", dir], Directory) if all_digits(dir) => true, _ => false,