]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/pubsub: do init/validation in init_processing()
authorCasey Bodley <cbodley@redhat.com>
Sat, 9 Mar 2024 16:08:17 +0000 (11:08 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 10 Apr 2024 17:09:17 +0000 (13:09 -0400)
commit88a35fed3507e37ad191995b014cbd5b089280d0
treef24694a8a2c87f70cabf11ec42afbf55aee0edb8
parent6fe68c58932b6cda6180be91e8a1b5b465e74711
rgw/pubsub: do init/validation in init_processing()

verify_permission() should do permission checks and nothing else!

admin/system users ignore errors from verify_permission() and go on to
call execute() regardless. that means that execute() can't rely on any
initialization that happened during verify_permission(), at risk of
crashing on admin/system requests. it also means that any permission
checks in execute() won't get overridden for admin/system users,
breaking their superuser access

by moving all parameter validation and initialization into
init_processing(), we can prepare all the state that verify_permission()
will need to do it's thing

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rest_pubsub.cc