From bf9c66e16dfc704c3471f42d9f6b9b1682f9969e Mon Sep 17 00:00:00 2001 From: yuliyang_yewu Date: Fri, 15 Jan 2021 08:44:03 +0800 Subject: [PATCH] rgw: fix sts get_session_token always failed because of wrong check fix https://tracker.ceph.com/issues/48883 Signed-off-by: yuliyang_yewu --- src/rgw/rgw_rest_sts.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_sts.cc b/src/rgw/rgw_rest_sts.cc index edc3459055a..3efee205067 100644 --- a/src/rgw/rgw_rest_sts.cc +++ b/src/rgw/rgw_rest_sts.cc @@ -434,9 +434,10 @@ int RGWSTSGetSessionToken::get_params() } if (duration_in_secs < STS::GetSessionTokenRequest::getMinDuration() || - duration_in_secs > s->cct->_conf->rgw_sts_max_session_duration) + duration_in_secs > s->cct->_conf->rgw_sts_max_session_duration) { ldout(s->cct, 0) << "Invalid duration in secs: " << duration_in_secs << dendl; return -EINVAL; + } } return 0; -- 2.39.5