Bug #48049
rgw: getting S3 website root without last slash crashes rgw
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
website
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Description
First, make a bucket and configure it as follows:
s3cmd mb s3://website
s3cmd put index.html s3://website
s3cmd put error.html s3://website
s3cmd setacl --acl-public s3://website/index.html
s3cmd setacl --acl-public s3://website/error.html
s3cmd ws-create --ws-index=index.html --ws-error=error.html s3://website
And if I try to get the index page like this:
curl -v http://${S3WEBSITE_HOST}/website
RGW crashes with the following log.
ceph version 16.0.0-6701-g63c2043 (63c2043bbdb45df7179695959c6748e23d316b39) pacific (dev)
1: /root/ceph/build/lib/libradosgw.so.2(+0x232820c) [0x7fd09388920c]
2: /lib64/libpthread.so.0(+0xf5f0) [0x7fd0853545f0]
3: (std::string::_M_data() const+0xc) [0x7fd092cf192e]
4: (std::string::_M_rep() const+0x18) [0x7fd092cf194c]
5: (std::string::size() const+0x18) [0x7fd092cefe9e]
6: (std::string::operator std::basic_string_view<char, std::char_traits<char> >() const+0x28) [0x7fd092d05bd2]
7: (RGWHandler_REST_S3Website::web_dir() const+0x128) [0x7fd09353b9b2]
8: (RGWHandler_REST_S3Website::retarget(RGWOp*, RGWOp**)+0x341) [0x7fd09353c737]
9: (rgw_process_authenticated(RGWHandler_REST*, RGWOp*&, RGWRequest*, req_state*, bool)+0x3e6) [0x7fd092ec9811]
10: (process_request(rgw::sal::RGWRadosStore*, RGWREST*, RGWRequest*, std::string const&, rgw::auth::StrategyRegistry
const&, RGWRestfulIO*, OpsLogSocket*, optional_yield, rgw::dmclock::Scheduler*, int*)+0x195d) [0x7fd092eccde1]
However, if I try to get the root with the last slash, it succeeds.
curl -v http://${S3WEBSITE_HOST}/website/
History
#1 Updated by Ilsoo Byun over 3 years ago
I made a related PR: https://github.com/ceph/ceph/pull/37903
#2 Updated by Casey Bodley over 3 years ago
- Status changed from New to Fix Under Review
- Tags set to website
- Pull request ID set to 37903
#3 Updated by Daniel Gryniewicz over 3 years ago
- Pull request ID changed from 37903 to 37975
#4 Updated by Daniel Gryniewicz over 3 years ago
- Status changed from Fix Under Review to Resolved