Untitled conversation
- User
[BUG] S3 dot-dot object requests return InvalidKey
Service
AWS API Action
Expected behavior
AWS behavior rejects object requests whose key causes a dot-dot path segment to appear in the request URI with HTTP 400 Bad Request and an empty response body.
Actual behavior
Floci returns an
InvalidKeyerror body:textAn error occurred (InvalidKey) when calling the PutObject operation: The specified key is invalid.Reproduction
bashprintf 'safe-data' > body.txt aws --endpoint-url http://localhost:4566 s3api create-bucket \ --bucket raw-path-bucket aws --endpoint-url http://localhost:4566 s3api put-object \ --bucket raw-path-bucket \ --key ../bad.txt \ --body body.txtEnvironment
- Floci version / image tag: local Docker image built from main commit
a7b0826c - Java SDK version (if applicable): N/A; verified with AWS CLI
- How you're running Floci (Docker / native /
mvn quarkus:dev): Docker
Interface
No new interfaces are introduced.
- Floci version / image tag: local Docker image built from main commit
- Assistant
I’ll trace S3 URI parsing and its current
InvalidKeypath, then add focused Put/Delete coverage for AWS’s empty-body 400 behavior and run the relevant tests. - Assistant
rgisn’t installed in this checkout, so I’m using repository-scopedfind/grepsearches instead. - Assistant
The existing validator already matches S3’s relative-segment rule (internal
a/../bis allowed; traversal above the key root is rejected). The mismatch is response mapping: those rejections are currently converted to the normal S3 XMLInvalidKeypayload. I’m keeping the validation rule and narrowing the change to an empty HTTP 400 for PutObject/DeleteObject. - Assistant
The focused regression set is running now, including raw and percent-encoded traversal, the allowed internal
docs/../filecase, and DeleteObject. - Assistant
The build compiled production and test sources successfully, but the test runner tried to fetch a missing Surefire provider. I stopped it to honor the no-network constraint and will retry strictly offline.
- Assistant
The implementation and regression tests compile cleanly. Full execution is blocked only by absent local Maven artifacts (
surefire-junit-platformand Quarkus Dev UI); offline mode correctly prevented fetching them. I’m doing the final diff/whitespace review now.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.