From: Casey Bodley Date: Fri, 6 Sep 2019 18:44:59 +0000 (-0400) Subject: rgw: fix dns name comparison for virtual hosting X-Git-Tag: v15.1.0~1596^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=60b2dbe67af4a919df0d1b802c1fe21909c48d4c;p=ceph.git rgw: fix dns name comparison for virtual hosting Fixes: https://tracker.ceph.com/issues/41692 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index bbc232c16e0e5..a8fe2de62c855 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -241,10 +241,11 @@ static bool str_ends_with_nocase(const string& s, const string& suffix, size_t * *pos = p; } - return boost::algorithm::iends_with(suffix, s); + return boost::algorithm::iends_with(s, suffix); } -static bool rgw_find_host_in_domains(const string& host, string *domain, string *subdomain, set valid_hostnames_set) +static bool rgw_find_host_in_domains(const string& host, string *domain, string *subdomain, + const set& valid_hostnames_set) { set::iterator iter; /** TODO, Future optimization