From f08cac618c90533bc121ddc84e08eddb4016b8be Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Wed, 18 Jan 2023 03:19:19 -0700 Subject: [PATCH] fix(common.cookie): Allow any 2xx status code (#12515) --- plugins/common/cookie/cookie.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/common/cookie/cookie.go b/plugins/common/cookie/cookie.go index b9e8934c4..849ab8ed7 100644 --- a/plugins/common/cookie/cookie.go +++ b/plugins/common/cookie/cookie.go @@ -115,8 +115,7 @@ func (c *CookieAuthConfig) auth() error { return err } - // check either 200 or 201 as some devices may return either - if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated { + if resp.StatusCode < 200 || resp.StatusCode > 299 { return fmt.Errorf("cookie auth renewal received status code: %v (%v) [%v]", resp.StatusCode, http.StatusText(resp.StatusCode),