From ed25b0f77690abe1f04e4cdcb284b7e17208d169 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 9 May 2025 18:07:21 +0200 Subject: RepositoryConfig: Ensure consistency in reading blobs and trees ...with respect to rejecting invalid entries such as upwards symlinks. Also ensure that valid trees are only checked once by remebering known valid tress though marker files in local storage. --- src/buildtool/execution_api/utils/rehash_utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/buildtool/execution_api/utils/rehash_utils.cpp') diff --git a/src/buildtool/execution_api/utils/rehash_utils.cpp b/src/buildtool/execution_api/utils/rehash_utils.cpp index 9e64a546..66d3a57f 100644 --- a/src/buildtool/execution_api/utils/rehash_utils.cpp +++ b/src/buildtool/execution_api/utils/rehash_utils.cpp @@ -285,10 +285,10 @@ auto RehashGitDigest(std::vector const& digests, StorageConfig const& target_config, RepositoryConfig const& repo_config) -> expected, std::string> { - auto read = [&repo_config]( - ArtifactDigest const& digest, - ObjectType /*type*/) -> std::optional { - return repo_config.ReadBlobFromGitCAS(digest.hash()); + auto read = [&repo_config](ArtifactDigest const& digest, + ObjectType type) -> std::optional { + return repo_config.ReadBlobFromGitCAS( + digest.hash(), /*is_symlink=*/IsSymlinkObject(type)); }; return RehashDigestImpl(digests, source_config, -- cgit v1.2.3