]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #16659 from rzarzynski/wip-rgw-20797
authorCasey Bodley <cbodley@users.noreply.github.com>
Mon, 3 Jun 2019 12:59:12 +0000 (08:59 -0400)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2019 12:59:12 +0000 (08:59 -0400)
rgw: TempURL should not allow PUTs with the X-Object-Manifest.

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
1  2 
src/rgw/rgw_swift_auth.cc
src/rgw/rgw_swift_auth.h

index ad810252c1ba9fccf11aa03aaad0f2f96a66bd65,c752350ec5f5e7c3191cba4836a6b3d61a37e803..f273e39e4108755f0d2c3140d87cf3ed57deb21a
@@@ -2,11 -2,10 +2,12 @@@
  // vim: ts=8 sw=2 smarttab
  
  #include <array>
+ #include <algorithm>
  
 -#include <boost/utility/string_ref.hpp>
 +#include <boost/utility/string_view.hpp>
  #include <boost/container/static_vector.hpp>
 +#include <boost/algorithm/string/predicate.hpp>
 +#include <boost/algorithm/string.hpp>
  
  #include "rgw_swift_auth.h"
  #include "rgw_rest.h"
index 76ffc16e7e1e4d866e2ee69bcd99c988e6589dd7,fd3c1b712f3dcec7a8972a3ae0a544f802309d2b..df317a0e82457c64f1a87448c5cea09f9479d178
@@@ -43,15 -43,13 +43,16 @@@ class TempURLEngine : public rgw::auth:
    const TempURLApplier::Factory* const apl_factory;
  
    /* Helper methods. */
 -  void get_owner_info(const req_state* s,
 +  void get_owner_info(const DoutPrefixProvider* dpp, 
 +                      const req_state* s,
                        RGWUserInfo& owner_info) const;
 +  std::string convert_from_iso8601(std::string expires) const;
    bool is_applicable(const req_state* s) const noexcept;
    bool is_expired(const std::string& expires) const;
+   bool is_disallowed_header_present(const req_info& info) const;
  
    class SignatureHelper;
 +  class PrefixableSignatureHelper;
  
  public:
    TempURLEngine(CephContext* const cct,