]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: make init env methods return an error 20564/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 12 Feb 2018 17:05:03 +0000 (18:05 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 21 Feb 2018 13:00:51 +0000 (14:00 +0100)
commitb206912d753778b8d889a903f509a6f951cf41a4
tree7ad1324eeb14c61f5a74552cd44e87cb7636d10a
parent2dab17a455c09584f2a85e6b10888337d1ec8949
rgw:  make init env methods return an error

Since web frontends may signal an error when requests are malformed or so, let
us double check this and raise errors early. The current user of this is
civetweb frontend; which can potentially return null from `parse_http_headers`
when a HTTP header without a ":" is supplied at which point headers.value is
null which can lead to undefined behaviour later in RGW.

Fixes: http://tracker.ceph.com/issues/23039
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 7872a831783e17dcc4d0aa70cffc256afb664f7a)

src/rgw/rgw_lib.h:
  Added https://github.com/ceph/ceph/pull/19065 to the backport as it is harmless
12 files changed:
src/rgw/rgw_asio_client.cc
src/rgw/rgw_asio_client.h
src/rgw/rgw_civetweb.cc
src/rgw/rgw_civetweb.h
src/rgw/rgw_client_io.cc
src/rgw/rgw_client_io.h
src/rgw/rgw_fcgi.cc
src/rgw/rgw_fcgi.h
src/rgw/rgw_lib.h
src/rgw/rgw_loadgen.cc
src/rgw/rgw_loadgen.h
src/rgw/rgw_process.cc