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:An error occurred (InvalidKey) when calling the PutObject operation: The specified key is invalid.Reproduction
printf '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 raw-path handling and its error mapping, then add focused PutObject/DeleteObject coverage for the AWS-compatible bare 400 response.
- Assistant
The mismatch is localized: traversal escaping the bucket is detected correctly, but it is thrown as
AwsException, so PutObject/DeleteObject serialize an S3InvalidKeyXML body. I’m separating that URI condition from ordinary invalid keys while preserving the existing traversal-validity rules. - Assistant
Compilation succeeded. The test runner then attempted to fetch a missing Surefire provider, so I stopped it to honor the no-internet constraint; I’ll retry strictly offline and use local checks if that dependency is unavailable.
- Assistant
The offline build now compiles both production and test sources cleanly. Since the JUnit provider is absent locally, I’m doing a direct protocol check against Quarkus using a path-preserving HTTP client.
- Assistant
The first packaged smoke test exposed stale incremental bytecode: Maven had not recompiled the controller after the catch blocks moved, so it still returned
InvalidKey. I’m forcing a clean offline build, then repeating the wire check. - Assistant
The clean wire-level check now matches AWS: raw and encoded escaping
..paths return400withContent-Length: 0for PUT and DELETE, while a valid internaldocs/../file.txtkey still succeeds.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →