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

[Bug] - REST ListObject V1 - NextMarker erroneously shown without delimiter param #999

Open
lrm25 opened this issue Dec 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lrm25
Copy link
Contributor

lrm25 commented Dec 23, 2024

Describe the bug
For REST ListObjects, the NextMarker param should only be used if the delimiter is set. It's appearing despite not being set.

<?xml version="1.0" encoding="UTF-8"?>
   <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>versity-gwtest-bucket-one-1</Name><NextMarker>test_file</NextMarker><MaxKeys>1</MaxKeys><IsTruncated>true</IsTruncated><Contents><LastModified>2024-12-23T18:07:52.408Z</LastModified><ETag>2013e39a400cd12164dc5fe319682b72</ETag><Key>test_file</Key><Size>10</Size><StorageClass>STANDARD</StorageClass></Contents><EncodingType></EncodingType></ListBucketResult>
   2024-12-23 15:07:53 DEBUG next marker: <NextMarker>test_file</NextMarker>

To Reproduce

  1. Start versitygw, e.g.: ./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
  2. Create a bucket, e.g.: aws --no-verify-ssl s3api create-bucket --bucket versity-gwtest-bucket-one-1
  3. Create two local objects, and place in the s3 bucket, e.g.: 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
  4. Send a list-objects command with the max-keys parameter set to 1 and no delimiter, e.g.: curl -ks -w %{http_code} https://localhost:7070/versity-gwtest-bucket-one-1?max-keys=1 -H Authorization: AWS4-HMAC-SHA256 Credential=********/20241223/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=7942ff240c58c0af5758511b67a6d186eb1468fb49cf81bc29c88689f35306a5 -H x-amz-content-sha256: UNSIGNED-PAYLOAD -H x-amz-date: 20241223T180835Z -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/objects.txt

Expected behavior
The NextMarker parameter doesn't show up.

Server Version
Version : v1.0.9
Build : c0b6183
BuildTime: 2024-12-20_07:07:55PM
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

@lrm25 lrm25 added the bug Something isn't working label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant