Repository navigation
S3: preserve repeated object path slashes with a per-driver option - #2189
Merged
micafer merged 8 commits intoNov 10, 2026
Merged
Conversation
Addresses apache#1654 without changing the global URL normalization default. Generated-by: OpenAI Codex
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2189 +/- ##
==========================================
+ Coverage 83.62% 83.64% +0.02%
==========================================
Files 352 352
Lines 82233 82321 +88
Branches 8840 8868 +28
==========================================
+ Hits 68767 68853 +86
- Misses 10593 10594 +1
- Partials 2873 2874 +1
🚀 New features to boost your workflow:
|
Add test to verify signed request path preservation for GET and PUT methods.
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.
Description
Addresses #1654 with the per-driver opt-in discussed in the issue. S3 object names may contain leading or repeated slashes, but the default connection URL normalization can collapse them. Deleting such a key can return success for a different path while leaving the intended object in the bucket.
Add
S3StorageDriver(..., ex_allow_path_double_slashes=True)to preserve the request path before signing and sending it. The default remains unchanged, the existing global setting remains supported, and enabling the option does not affect another driver instance. Includes documentation and a changelog entry.Regression tests inspect the outgoing DELETE request for
/object,path//object, and//path///object, and verify per-driver isolation and global-setting compatibility. Before the fix, all three request-path assertions and the per-driver assertion fail.Status
Ready for review. Prepared with OpenAI Codex assistance.
Validation:
python -m pytest libcloud/test/storage/test_s3.py libcloud/test/common/test_base.py libcloud/test/test_connection.py -q— 89 passed, 1 skipped, 3 subtests passed.git diff --check— passed.Checklist
November 8 validation after merging trunk: 53 S3 tests passed, one skipped, with three passing subtests. Two Windows download tests failed on both this branch and unchanged trunk (which had 51 passes). The S3 implementation and regression tests match the previously published version; the conflict was in the release notes.
November 10: merged trunk at 0317e58 and retained both upstream storage release notes and the S3 entry. The conflict only affected CHANGES.rst; our S3 implementation and tests are unchanged. Targeted S3/common-base/connection tests: 85 pass, one skip, three passing subtests. Four failures reproduce on unchanged trunk (83 pass): two Windows temporary-file download failures and two proxy-environment assertions. Whitespace validation passes. No live AWS or full provider-suite run. Published as 774f842.