You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add objects to bucket, e.g. (for each): aws --no-verify-ssl s3api put-object --body /Users/lukemccrone/devel/versitygw/versity-gwtest-files/test_file --bucket versity-gwtest-bucket-one-1 --key test_file
Use script at https://github.com/versity/versitygw/blob/test/rest_list_objects_v2/tests/rest_scripts/list_objects.sh, with MAX_KEYS=1 and VERSION_TWO="TRUE", to retrive the NextContinuationToken. The command should look like this in cURL: curl -ks -w %{http_code} https://localhost:7070/versity-gwtest-bucket-one-1?list-type=2&max-keys=1 -H Authorization: AWS4-HMAC-SHA256 Credential=********/20241218/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=c355bc89bd67bfd4b3d4b7801f2dcd908bc74b1ff3794fa067d768add2025887 -H x-amz-content-sha256: UNSIGNED-PAYLOAD -H x-amz-date: 20241218T193411Z -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/objects.txt
Do the same, but set CONTINUATION_TOKEN to something that doesn't match.
Expected behavior
An error is returned.
Server Version
Version : v1.0.9
Build : bd80166
BuildTime: 2024-12-13_04:08:01PM
Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64
The text was updated successfully, but these errors were encountered:
lrm25
changed the title
[Bug] - ListObjectsV2 - invalid continuation token displays first item(s) in object list rather than returning error
[Bug] - ListObjectsV2 - invalid continuation token displays next item(s) in alphabetical order in object list rather than returning error
Dec 18, 2024
lrm25
changed the title
[Bug] - ListObjectsV2 - invalid continuation token displays next item(s) in alphabetical order in object list rather than returning error
[Bug] - ListObjectsV2 - continuation token behaves like v1 marker rather than v2 continuation token
Dec 20, 2024
lrm25
changed the title
[Bug] - ListObjectsV2 - continuation token behaves like v1 marker rather than v2 continuation token
[Bug] - ListObjectsV2 - invalid continuation token behaves like v1 marker rather than returning error
Dec 20, 2024
The implementation of ListObjectsV2'sContinuationToken in the gateway differs from the one in S3. It is more similar to the NextMarker used in ListObjects.
In S3, the ContinuationToken is generated based on object keys, whereas the gateway directly returns the object key as the ContinuationToken.
I'm unsure if this needs to be changed—@benmcclelland might be able to clarify.
Describe the bug
Direct to s3, an invalid continuation token for ListObjectsV2 will return an error like the following:
However, via versitygw, something similar to the following is returned:
Also, if the bogus continuation token is ahead of all other keys in alphabetical order:
To Reproduce
./versitygw --access=******** --secret=******** --region=us-east-1 --iam-dir=/Users/lukemccrone/devel/versitygw/iam --cert /Users/lukemccrone/devel/versitygw/cert.pem --key /Users/lukemccrone/devel/versitygw/versitygw.pem posix --versioning-dir /tmp/versioning /tmp/gw
aws --no-verify-ssl s3api create-bucket --bucket versity-gwtest-bucket-one-1
aws --no-verify-ssl s3api put-object --body /Users/lukemccrone/devel/versitygw/versity-gwtest-files/test_file --bucket versity-gwtest-bucket-one-1 --key test_file
NextContinuationToken
. The command should look like this in cURL:curl -ks -w %{http_code} https://localhost:7070/versity-gwtest-bucket-one-1?list-type=2&max-keys=1 -H Authorization: AWS4-HMAC-SHA256 Credential=********/20241218/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=c355bc89bd67bfd4b3d4b7801f2dcd908bc74b1ff3794fa067d768add2025887 -H x-amz-content-sha256: UNSIGNED-PAYLOAD -H x-amz-date: 20241218T193411Z -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/objects.txt
Expected behavior
An error is returned.
Server Version
Version : v1.0.9
Build : bd80166
BuildTime: 2024-12-13_04:08:01PM
Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64
The text was updated successfully, but these errors were encountered: