]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: tempurl signature fixes: support sha256 and sha512
authorMarcus Watts <mwatts@redhat.com>
Mon, 22 Aug 2022 07:38:18 +0000 (03:38 -0400)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Tue, 20 Aug 2024 12:55:17 +0000 (19:55 +0700)
commit1906af7dcc8beb8535c0e413b7ab805739d57fd5
tree9c87cb2365f4e52961238f0da918f6ecfc20c0fc
parent68288907c7160826dc91614faea1ede6657e176f
rgw: tempurl signature fixes: support sha256 and sha512

The latest openstack swift logic supports sha256 and sha512 checksums
for tempurl and formpost, which can be either hexadecimal or
hashname:base64.  This adds logic to inspect the incoming signature
for type and to internally construct the same hash to compare.

Also:: fixes an incidental crash if a malformed swift path does not
contain an object name.

Fixes: https://tracker.ceph.com/issues/56564
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit e2023d28dc6e6e835303716e7235df720d33a01c)
src/rgw/rgw_swift_auth.cc
src/rgw/rgw_swift_auth.h