]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: sanitize newlines in s3 CORSConfiguration's ExposeHeader 35774/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 26 May 2020 19:03:03 +0000 (15:03 -0400)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 25 Jun 2020 12:01:03 +0000 (14:01 +0200)
commit3c36e74aa9c6b760d0fbc5c50419052d531ffdb7
treeb8da2e1c8051fb66a49fd390d049d707a636b1e2
parent5c9eee5a7ad1bb8b161f33b4560d5dfc4a000b6d
rgw: sanitize newlines in s3 CORSConfiguration's ExposeHeader

the values in the <ExposeHeader> element are sent back to clients in a
Access-Control-Expose-Headers response header. if the values are allowed
to have newlines in them, they can be used to inject arbitrary response
headers

this issue only affects s3, which gets these values from an xml document

in swift, they're given in the request header
X-Container-Meta-Access-Control-Expose-Headers, so the value itself
cannot contain newlines

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Reported-by: Adam Mohammed <amohammed@linode.com>
src/rgw/rgw_cors.cc