mirror of
https://github.com/ceph/ceph
synced 2025-02-28 13:32:27 +00:00
Merge pull request #59983 from tobias-urdin/rgw-presigned-500
rgw/auth: fix internal server error for presigned urls Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
65851613ba
@ -505,12 +505,12 @@ rgw::auth::Strategy::apply(const DoutPrefixProvider *dpp, const rgw::auth::Strat
|
||||
ldpp_dout(dpp, 5) << "Failed the auth strategy, reason="
|
||||
<< result.get_reason() << dendl;
|
||||
// Special handling for expired pre-signed URL
|
||||
if (result.get_reason() == ERR_PRESIGNED_URL_EXPIRED) {
|
||||
if (result.get_reason() == -ERR_PRESIGNED_URL_EXPIRED) {
|
||||
result = result_t::deny(-EPERM);
|
||||
set_req_state_err(s, -EPERM, "The pre-signed URL has expired");
|
||||
}
|
||||
// Special handling for disabled presigned URL
|
||||
if (result.get_reason() == ERR_PRESIGNED_URL_DISABLED) {
|
||||
if (result.get_reason() == -ERR_PRESIGNED_URL_DISABLED) {
|
||||
result = result_t::deny(-EPERM);
|
||||
set_req_state_err(s, -EPERM, "Presigned URLs are disabled by admin");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user