Skip to content

Commit

Permalink
Merge pull request #49785 from theanalyst/rgw-swift-key
Browse files Browse the repository at this point in the history
rgw: swift : check for valid key in POST forms

Reviewed-by: Daniel Gryniewicz <[email protected]>
Reviewed-by: Adam C. Emerson <[email protected]>
  • Loading branch information
ivancich authored Feb 18, 2023
2 parents bf6d9f8 + 4be2fce commit 27b35a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rgw/rgw_rest_swift.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1976,8 +1976,10 @@ void RGWFormPost::init(rgw::sal::Driver* const driver,
req_state* const s,
RGWHandler* const dialect_handler)
{
prefix = std::move(s->object->get_name());
s->object->set_key(rgw_obj_key());
if (!rgw::sal::Object::empty(s->object)) {
prefix = std::move(s->object->get_name());
s->object->set_key(rgw_obj_key());
}

return RGWPostObj_ObjStore::init(driver, s, dialect_handler);
}
Expand Down

0 comments on commit 27b35a6

Please sign in to comment.