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

check object name and uploadID when processing multiupload #2901

Merged
merged 3 commits into from
Apr 12, 2022

Conversation

guol-fnst
Copy link
Contributor

When initializing multipartUploading , a specified uploadid will be assigned.
But we can still upload part of object successfully if a wrong object name combined with right upload id are specified.
Actually a error should be returned in this situation.

Here is a example response when wrong object name or wrong upload id are specified.

PUT /bucket1/nnnpp?uploadId=48134035-a1e8-4308-a3b4-872373405e3f&partNumber=1 HTTP/1.1
User-Agent: curl/7.29.0
Host: 193.168.140.103:29000
Accept: /
Date: Fri, 08 Apr 2022 09:12:59 +0000
Authorization: AWS 1VL1TGB3NMTB6DKQBSN8:xwuT9u22zjzuz+Qi9sHROj231/A=
Content-Length: 176
Expect: 100-continue

< HTTP/1.1 404 Not Found
< Accept-Ranges: bytes
< Content-Length: 349
< Content-Type: application/xml
< Server: SeaweedFS S3
< X-Amz-Request-Id: 1649408623833001509
< Date: Fri, 08 Apr 2022 09:03:43 GMT
< Connection: close
<

  • Closing connection 0
    NoSuchUploadThe specified multipart upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed./bucket1/nnnpp1649408623832912777nnnppbucket1

@chrislusf
Copy link
Collaborator

this will work, but add another metadata lookup.

We can hash the object key into an upload id, and just verify the hash.

1 similar comment
@chrislusf
Copy link
Collaborator

this will work, but add another metadata lookup.

We can hash the object key into an upload id, and just verify the hash.

@chrislusf chrislusf merged commit 72db181 into seaweedfs:master Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants