Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 head object, erroneously modified object name #2982

Open
2 of 3 tasks
luoyanpeng-bytedancer opened this issue Jan 23, 2025 · 0 comments
Open
2 of 3 tasks

s3 head object, erroneously modified object name #2982

luoyanpeng-bytedancer opened this issue Jan 23, 2025 · 0 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@luoyanpeng-bytedancer
Copy link

Acknowledgements

Describe the bug

s3 head object:If the object name starts with"/+ bucket name", the SDK will remove the bucket name from the object name in the path of the URL, causing the request to return 404.

code :
s3@v1.73.2 internal/customizations/update_endpoint.go
func moveBucketNameToHost(u *url.URL, bucket string) { u.Host = bucket + "." + u.Host removeBucketFromPath(u, bucket) }

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Object names should not be modified

Current Behavior

If the object name starts with"/+ bucket name", the SDK will remove the bucket name from the object name in the path of the URL

Reproduction Steps

Head An object prefixed with "/+ bucket name"

Possible Solution

No response

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

github.com/aws/aws-sdk-go-v2 v1.33.0
github.com/aws/aws-sdk-go-v2/config v1.5.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.73.2
github.com/aws/smithy-go v1.22.1

Compiler and Version used

go version go1.21.7 darwin/amd64

Operating System and version

macOS 14.0 (23A344)

@luoyanpeng-bytedancer luoyanpeng-bytedancer added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant