提交 c2687ed1 编写于 作者: W Wadeck Follonier 提交者: Oliver Gondža

[JENKINS-60454, 55070, 59992, 61192] Correct symptom of missing instance (#4525)

* [JENKINS-55070] Correct symptom of missing instance

* Apply Daniel's proposal
Co-authored-by: NDaniel Beck <1831569+daniel-beck@users.noreply.github.com>
(cherry picked from commit ae99586f)
上级 3a6b69d7
......@@ -161,10 +161,15 @@ public class TokenBasedRememberMeServices2 extends TokenBasedRememberMeServices
@Override
public Authentication autoLogin(HttpServletRequest request, HttpServletResponse response) {
if(Jenkins.get().isDisableRememberMe()){
Jenkins j = Jenkins.getInstanceOrNull();
if (j == null) {
// as this filter could be called during restart, this corrects at least the symptoms
return null;
}
if (j.isDisableRememberMe()) {
cancelCookie(request, response, null);
return null;
}else {
} else {
try {
// we use a patched version of the super.autoLogin
String rememberMeValue = findRememberMeCookieValue(request, response);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册