s3-tests/s3tests_boto3/functional
Robin H. Johnson 5914eb2005 test_post_object_upload_size_rgw_chunk_size_bug: new testcase
`ERR_TOO_SMALL` is wrongly returned if all of the following are true,
- the get_data returns multiple items (chunks)
- the length of the last item is smaller than the POST Policy's min
  value for content-length-range.

The check should be `(ofs < min_len)` instead of `(len < min_len)`

This is further confirmed by the next line of `s->obj_size = ofs`

Move the `int len` scope inside loop to try and prevent the bug in
future.

The bug was refactored in 2016, but was introduced in Oct 2012, when
this functionality was first added to RGW in commit 7bb3504d3f0974e9863f536e9af0ce8889d6888f.

Reference: 933a42f9af/src/rgw/rgw_op.cc (L4474-L4513)
Reference: 7bb3504d3f
Signed-off-by: Robin H. Johnson <rjohnson@digitalocean.com>
2023-02-17 10:09:59 -05:00
..
__init__.py pytest: add global configfile and autouse teardown fixtures 2023-01-21 22:40:33 -05:00
policy.py boto3: Foundation laid for boto3 tests 2019-01-16 16:31:24 -05:00
rgw_interactive.py boto3: Foundation laid for boto3 tests 2019-01-16 16:31:24 -05:00
test_headers.py test_headers: add custom marks for auth_common/aws2/aws4 2023-01-25 17:07:40 -05:00
test_iam.py nose: remove nose attrs and imports 2023-01-21 22:40:33 -05:00
test_s3.py test_post_object_upload_size_rgw_chunk_size_bug: new testcase 2023-02-17 10:09:59 -05:00
test_s3select.py nose: remove nose attrs and imports 2023-01-21 22:40:33 -05:00
test_sts.py nose: remove nose attrs and imports 2023-01-21 22:40:33 -05:00
test_utils.py pytest: replace nose eq() with assert == 2023-01-21 22:40:33 -05:00
utils.py pytest: replace nose eq() with assert == 2023-01-21 22:40:33 -05:00