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

Set prefix, delimiter params even when empty #1064

Merged
merged 1 commit into from
Jan 20, 2019

Commits on Jan 17, 2019

  1. Set prefix, delimiter params even when empty

    We have never set values which are empty on the request
    because they are perhaps not useful in the List query,
    but this assumption is wrong when there are restricted
    policies for a given user, because empty is actually
    a valid value in IAM or Bucket policy conditions.
    
    For example following condition would never work with our
    ListObjects call and AWS cli would work fine.
    ```json
                "Condition": {
                    "StringEquals": {
                        "s3:prefix": [
                            "",
                            "data/",
                            "data"
                        ],
                        "s3:delimiter": [
                            "/",
                            ""
                        ]
                    }
                }
    ```
    
    The reason is empty or not `prefix` and `delimiter` should be
    added to the query param in List operation, such that server
    can use the value to validate the policies for the incoming
    request.
    
    Fixes minio/mc#2647
    harshavardhana committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    55a465a View commit details
    Browse the repository at this point in the history