S3 object keys can escape above the bucket root during path normalization Reject keys…
- User
S3 object keys can escape above the bucket root during path normalization
Reject keys whose normalized path escapes above the bucket root with HTTP 400 and the S3 error code
InvalidKey, without creating, deleting, or modifying object storage.Interface
No new interfaces are introduced.
- Assistant
I’ll trace S3 key parsing and storage mutation paths, add a validation at the narrow shared boundary, and cover the escape cases with focused tests.
- Assistant
The repository already has filesystem containment checks, but they happen after metadata writes in several PUT/DELETE/versioning flows. I’m tightening validation before any store key is constructed, including multipart and copy paths, while preserving legal internal normalization such as
docs/../file.txt. - Assistant
The focused build compiled production and test sources successfully. Maven then attempted to resolve a missing Surefire component remotely, so I stopped it and am continuing verification in offline mode as requested.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.