Skip to content

fix(s3): prevent "0" path from being treated as root#58615

Merged
susnux merged 6 commits into
masterfrom
jtr/fix-s3-normalizePath-falsy
Mar 2, 2026
Merged

fix(s3): prevent "0" path from being treated as root#58615
susnux merged 6 commits into
masterfrom
jtr/fix-s3-normalizePath-falsy

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Feb 27, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Prevented folders from being created called 0 (silently failed in the Web client; returning 405 on the backend)
No more falsy ambiguity with 0 named folder.

Note: Only real changes are in line 69 and 133

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@joshtrichards joshtrichards requested a review from a team as a code owner February 27, 2026 15:44
@joshtrichards joshtrichards requested review from CarlSchwan, come-nc, provokateurin and sorbaugh and removed request for a team February 27, 2026 15:44
@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable33

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable32

@joshtrichards joshtrichards added this to the Nextcloud 34 milestone Feb 27, 2026
@joshtrichards

joshtrichards commented Feb 27, 2026

Copy link
Copy Markdown
Member Author

Well, our side is fixed, but it turned up a similar problem in the AWS SDK:

https://github.com/nextcloud/3rdparty/blob/34fdf0b083a7997d8884646c1e0d6255704a05a3/aws/aws-sdk-php/src/Multipart/AbstractUploadManager.php#L242-L249

PR pending upstream: aws/aws-sdk-php#3253

This is the cause of the key error in the updated unit tests.

IMO shouldn't block this PR since we were already worse off before. I guess we may want to consider a temporary patch in our nextcloud/3rdparty repo since not sure (a) how long upstream will take (b) not sure how long until all of our supported majors are bumped to next SDK [Edit: or we drop the expanded test variations to return to the status quo on the test-side until upstream is fixed]

@provokateurin

Copy link
Copy Markdown
Member

@joshtrichards sounds good, can you open a PR to add the patch to 3rdparty?

@susnux susnux force-pushed the jtr/fix-s3-normalizePath-falsy branch from c12bbcf to 2d39c5a Compare March 2, 2026 12:45
@susnux

susnux commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

(rebased due to conflicts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: external storage feature: object storage hotspot: filename handling Filenames - invalid, portable, blacklisting, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants