Skip to content

[JENKINS-44010] Check nullability of getCrumbIssuer() on the Wizard #22061

Closed

Description

@jenkins-infra-bot

Jenkins.getInstance().getCrumbIssuer() method could potentially be null and the Admin user creation page is not checking it.

 

See the comment from amuniz in 3c39773#commitcomment-21985458


Originally reported by alobato, imported from: Check nullability of getCrumbIssuer() on the Wizard
  • assignee: jglick
  • status: Resolved
  • priority: Minor
  • component(s): core
  • label(s): 2.46.3-fixed, regression
  • resolution: Fixed
  • resolved: 2017-05-04T13:19:14+00:00
  • votes: 0
  • watchers: 4
  • imported: 2025-11-24
Raw content of original issue

Jenkins.getInstance().getCrumbIssuer() method could potentially be null and the Admin user creation page is not checking it.

 

See the comment from amuniz in 3c39773#commitcomment-21985458

Activity

  1. jenkins-infra-bot commented on May 3, 2017

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on May 3, 2017

    @jenkins-infra-bot
    Author
    oleg_nenashev:
    • Original comment link
    • Raw content of original comment:

      If you expect it to be backported, there should be much better description of the problem and the impact. As jglick said in another chat, this is probably a bad use-case

    If you expect it to be backported, there should be much better description of the problem and the impact. As jglick said in another chat, this is probably a bad use-case

  3. jenkins-infra-bot commented on May 3, 2017

    @jenkins-infra-bot
    Author
    jglick:
    • Original comment link
    • Raw content of original comment:

      I do not propose this as an lts-candidate.

    I do not propose this as an lts-candidate.

  4. jenkins-infra-bot commented on May 3, 2017

    @jenkins-infra-bot
    Author
    jglick:
    • Original comment link
    • Raw content of original comment:

      Reproducible with difficulty:

      • start Jenkins on fresh home
      • log in as initial admin user
      • install custom plugins, click None and proceed
      • browse to /configureSecurity/ and uncheck Prevent Cross Site Request Forgery exploits and Save the form
      • return to the dashboard, showing the setup wizard again
      • fill out admin user form and submit
      … org.eclipse.jetty.util.log.JavaUtilLog warn
      WARNING: Error while serving …/setupWizard/createAdminUser
      java.lang.reflect.InvocationTargetException
      	at …
      Caused by: java.lang.NullPointerException
      	at jenkins.install.SetupWizard.doCreateAdminUser(SetupWizard.java:257)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      	... 67 more
      

    Reproducible with difficulty:

    • start Jenkins on fresh home
    • log in as initial admin user
    • install custom plugins, click None and proceed
    • browse to /configureSecurity/ and uncheck Prevent Cross Site Request Forgery exploits and Save the form
    • return to the dashboard, showing the setup wizard again
    • fill out admin user form and submit
    … org.eclipse.jetty.util.log.JavaUtilLog warn
    WARNING: Error while serving …/setupWizard/createAdminUser
    java.lang.reflect.InvocationTargetException
    	at …
    Caused by: java.lang.NullPointerException
    	at jenkins.install.SetupWizard.doCreateAdminUser(SetupWizard.java:257)
    	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
    	... 67 more
    
  5. jenkins-infra-bot commented on May 4, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Jesse Glick
    Path:
    core/src/main/java/jenkins/install/SetupWizard.java
    core/src/main/java/jenkins/model/Jenkins.java
    http://jenkins-ci.org/commit/jenkins/ae1fdc95a1d50df65a97447ff536d21cb2c5dba2
    Log:
    [FIXED JENKINS-44010] It is possible for Jenkins.crumbIssuer to be unset while the setup wizard is running.

  6. jenkins-infra-bot commented on May 9, 2017

    @jenkins-infra-bot
    Author
    oleg_nenashev:
    • Original comment link
    • Raw content of original comment:

      I have added the "lts-candidate" flag, because the fix is trivial enough && extra annotations never hurt

    I have added the "lts-candidate" flag, because the fix is trivial enough && extra annotations never hurt

  7. jenkins-infra-bot commented on May 11, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: Jesse Glick Path: core/src/main/java/jenkins/install/SetupWizard.java core/src/main/java/jenkins/model/Jenkins.java http://jenkins-ci.org/commit/jenkins/543d184004e175da1efca68d9769eaa838763606 Log: [FIXED JENKINS-44010] It is possible for Jenkins.crumbIssuer to be unset while the setup wizard is running.

      (cherry picked from commit ae1fdc95a1d50df65a97447ff536d21cb2c5dba2)

    Code changed in jenkins
    User: Jesse Glick
    Path:
    core/src/main/java/jenkins/install/SetupWizard.java
    core/src/main/java/jenkins/model/Jenkins.java
    http://jenkins-ci.org/commit/jenkins/543d184004e175da1efca68d9769eaa838763606
    Log:
    [FIXED JENKINS-44010] It is possible for Jenkins.crumbIssuer to be unset while the setup wizard is running.

    (cherry picked from commit ae1fdc9)

  8. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions