Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68708

Crowd2 plugin crashes on loading JCasC jenkins.yaml with undefined "group"

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • crowd2-plugin
    • Crowd2-plugin 3.1.2, Jenkins 2.350, JCasC Version 1429.v09b_044a_c93de

      I configured Crowd2 authentication successfully and saved jenkins.yaml. Then I tried loading that file back (with minor changes to load passwords from files). Jenkins crashed, the logs indicated that the crash happened in CrowdSecurityRealm.java, line 203. In crowd2-plugin version 3.1.2 that line is:

      this.group = group.trim();

      There was no "group" field in jenkins.yaml. Once I added

      group: ""

      under jenkins/securityRealm/crowd, the config loading started working.

      Please make the code robust to the case when "group" is empty, e.g. convert null to an empty string.

          [JENKINS-68708] Crowd2 plugin crashes on loading JCasC jenkins.yaml with undefined "group"

          Bartosz Nowak added a comment -

          Thanks for this report.
          It's truly should be fixed. I currently do not have to much time to work on it, but if you feel confident enough feel free to submit PR.

          Bartosz Nowak added a comment - Thanks for this report. It's truly should be fixed. I currently do not have to much time to work on it, but if you feel confident enough feel free to submit PR.

          Pavel Roskin added a comment -

          Pavel Roskin added a comment - Pull request posted: https://github.com/jenkinsci/crowd2-plugin/pull/98

          Bartosz Nowak added a comment -

          Released

          Bartosz Nowak added a comment - Released

            dumam Bartosz Nowak
            proski Pavel Roskin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: