[JIRA] (JENKINS-59904) NPE when calling logout without cookie

0 views
Skip to first unread message

m.winter@sap.com (JIRA)

unread,
Oct 23, 2019, 10:45:03 AM10/23/19
to jenkinsc...@googlegroups.com
Markus Winter created an issue
 
Jenkins / Bug JENKINS-59904
NPE when calling logout without cookie
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-10-23 14:44
Environment: Jenkins 2.190.1
Priority: Minor Minor
Reporter: Markus Winter

Using some script we called the logout url of Jenkins. This lead to a null pointer exception as the code to search for stale session cookies is not performing a null check.

 
java.lang.NullPointerException
at hudson.security.SecurityRealm.clearStaleSessionCookies(SecurityRealm.java:328)
at hudson.security.SecurityRealm.doLogout(SecurityRealm.java:296)
at jenkins.model.Jenkins.doLogout(Jenkins.java:4063)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

m.winter@sap.com (JIRA)

unread,
Oct 24, 2019, 2:49:02 AM10/24/19
to jenkinsc...@googlegroups.com
Markus Winter updated an issue
Change By: Markus Winter
Using some script we called the logout url of Jenkins. This lead to a null pointer exception as the code to search for stale session cookies is not performing a null check.

 
java.lang.NullPointerException
at hudson.security.SecurityRealm.clearStaleSessionCookies(SecurityRealm.java:328)
at hudson.security.SecurityRealm.doLogout(SecurityRealm.java:296)
at jenkins.model.Jenkins.doLogout(Jenkins.java:4063)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)

 


How to reproduce:

curl [https://ci.jenkins.io/logout]


 

m.winter@sap.com (JIRA)

unread,
Oct 24, 2019, 2:51:11 AM10/24/19
to jenkinsc...@googlegroups.com

 
or open a browser, delete all cookies and the browse open the same url

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 10, 2019, 6:32:03 PM11/10/19
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Labels: lts-candidate

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 10, 2019, 6:32:03 PM11/10/19
to jenkinsc...@googlegroups.com
Oleg Nenashev resolved as Fixed
Change By: Oleg Nenashev
Status: Open Resolved
Resolution: Fixed
Released As: Jenkins 2.203

dbeck@cloudbees.com (JIRA)

unread,
Nov 22, 2019, 6:16:07 AM11/22/19
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Labels: lts-candidate
Reply all
Reply to author
Forward
0 new messages