]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: we should probably return InvalidArgument when XML_parser fails of the RGWPutACLs op 9200/head
authorweiqiaomiao <wei.qiaomiao@zte.com.cn>
Thu, 19 May 2016 10:18:07 +0000 (18:18 +0800)
committerweiqiaomiao <wei.qiaomiao@zte.com.cn>
Thu, 19 May 2016 10:18:07 +0000 (18:18 +0800)
when input xml documention is invalid, bucket put acls fails, but RGW return -EACCESS, which appears as AceessDenied to the client,
we should probably return _EINVAL(InvalidArgument) instead

Signed-off-by: weiqiaomiao <wei.qiaomiao@zte.com.cn>
src/rgw/rgw_op.cc

index e833a196fa74bee0376a204ad1645eb0a66d333a..efbfdfd64748a72115bbcd751a3e8a2d7bb8dd71 100644 (file)
@@ -3409,7 +3409,7 @@ void RGWPutACLs::execute()
   }
 
   if (!parser.parse(data, len, 1)) {
-    op_ret = -EACCES;
+    op_ret = -EINVAL;
     return;
   }
   policy = static_cast<RGWAccessControlPolicy_S3 *>(parser.find_first("AccessControlPolicy"));