Repository navigation
fix: ignore "directory" blobs in the Azure backend when walking. - #36
Merged
peterhuene merged 4 commits intoJun 24, 2026
Merged
Conversation
This commit fixes including "directory" blobs as output from the `walk` method, which should only be (conceptually) "files". Azure Blob Storage has a feature for creating empty-sized blobs that act as "directories" in a hierarchical namespace; the directory objects hold metadata such as Access Control Lists (ACLs). By including the directory as output from the `walk` function, callers might attempt to download the directory as a file and then create it as a directory when also downloading the directory's contents, which would result in a conflicting file system error. Additionally included a check for such conflicts so that walking returns an error. Replaced `localstack` with `floci` for testing.
8 tasks done
claymcleod
requested changes
Jun 24, 2026
claymcleod
left a comment
Member
There was a problem hiding this comment.
One path-safety issue could not be attached inline: in src/transfer.rs:851, walked object names are joined into local destination paths without rejecting .. or other non-normal components, so a crafted object name can escape the requested download directory. That looks pre-existing, but the new walk-conflict validation is a natural place to cover it.
Remove new deserialization code in favor of filtering out directories in the request to "list" a container's content.
claymcleod
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes including "directory" blobs as output from the
walkmethod, which should only be (conceptually) "files".Azure Blob Storage has a feature for creating empty blobs that act as "directories" in a hierarchical namespace; the directory objects hold metadata such as Access Control Lists (ACLs).
By including the directory as output from the
walkfunction, callers might attempt to download the directory as a file and then create it as a directory when also downloading the directory's contents, which would result in a conflicting file system error.Additionally included a check for such conflicts so that walking returns an error.
Replaced
localstackwithflocifor testing.Before submitting this PR, please make sure:
changes (when appropriate).
CHANGELOG.md(see"keep a changelog" for more information).