Merge pull request #22145 from Jeegn-Chen/wip-issue-24223

rgw: reject invalid methods in validate_cors_rule_method

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Yuri Weinstein 2018-07-06 07:02:06 -07:00 committed by GitHub
commit bb0b5cd000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -998,7 +998,7 @@ static bool validate_cors_rule_method(RGWCORSRule *rule, const char *req_meth) {
else if (strcmp(req_meth, "DELETE") == 0) flags = RGW_CORS_DELETE;
else if (strcmp(req_meth, "HEAD") == 0) flags = RGW_CORS_HEAD;
if ((rule->get_allowed_methods() & flags) == flags) {
if (rule->get_allowed_methods() & flags) {
dout(10) << "Method " << req_meth << " is supported" << dendl;
} else {
dout(5) << "Method " << req_meth << " is not supported" << dendl;