rgw: EPERM to ERR_INVALID_REQUEST
authorAbhishek Lekshmanan <abhishek@suse.com>
Fri, 27 Mar 2020 18:29:01 +0000 (19:29 +0100)
committerBastien Roucariès <rouca@debian.org>
Sat, 21 Oct 2023 16:42:26 +0000 (17:42 +0100)
As per Robin's comments and S3 spec

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
Origin: upstream, https://github.com/ceph/ceph/pull/34504/commits/607a65fccd8a80c2f2c74853a6dc5c14ed8a75c1

Gbp-Pq: Name CVE-2020-1760-2.patch

src/rgw/rgw_rest_s3.cc

index 547e9056f0f62bac3665d33dd37afe2c6565c6a7..2edf586163901616cf87bb0fe66b2aae64f124d4 100644 (file)
@@ -271,7 +271,7 @@ int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs,
        /* reject unauthenticated response header manipulation, see
         * https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html */
        if (s->auth.identity->is_anonymous()) {
-         return -EPERM;
+         return -ERR_INVALID_REQUEST;
        }
        if (strcmp(p->param, "response-content-type") != 0) {
          response_attrs[p->http_attr] = val;