• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • core
    • 2.138.2, fresh installation from the Ubuntu apt repository

      I just unsuccessfully tried setting up a brand new Jenkins instance on a brand new server. Everything worked fine, except it's not possible to create user accounts, at all. The issue is the same when using the setup wizard ("create first new user") as when going to Manage Jenkins -> Manage Users -> Create new user.

      The symptom is that no matter what is entered in the form (leaving all fields blank has the same effect as filling in everything correctly), when you press submit you simply get a HTTP 200 response. No error messages, nothing in jenkins.log, simply nothing happens.

       

      I reverted to 2.121.3 using "apt-get install jenkins=2.121.3" and everything worked just fine.

          [JENKINS-54143] Cannot create new users in 2.138.2

          I'm seeing the same on version 2.150 (updated recently from 2.146). Thanks for the workaround. Sorry for lack of logs, I checked those and there is nothing that would stand out as related. 

          The form just does:

          POST https://jenkins-url/securityRealm/createAccountByAdmin

          and the response is HTTP 200 with the same form.

          Ryszard Perkowski added a comment - I'm seeing the same on version 2.150 (updated recently from 2.146). Thanks for the workaround. Sorry for lack of logs, I checked those and there is nothing that would stand out as related.  The form just does: POST https://jenkins-url/securityRealm/createAccountByAdmin and the response is HTTP 200 with the same form.

          Daniel Beck added a comment -

          and the response is HTTP 200 with the same form.

          Is there a response body?

          Daniel Beck added a comment - and the response is HTTP 200 with the same form. Is there a response body?

          Daniel Beck added a comment -

          Okay, checked the code. The situation you describe can happes entirely without visible error message, if the user creation failed for any of these reasons:

          • Password didn't match
          • Password is required
          • User name is required
          • User name must only contain alphanumeric characters, underscore and dash
          • Invalid e-mail address
          • User name is already taken

          Daniel Beck added a comment - Okay, checked the code. The situation you describe can happes entirely without visible error message, if the user creation failed for any of these reasons: Password didn't match Password is required User name is required User name must only contain alphanumeric characters, underscore and dash Invalid e-mail address User name is already taken

          danielbeck: I've tried providing all proper data, its still failing with same issue. No Error in UI, Logs etc. Issue found in 2.138.3 version also.

          Shahal Tharique added a comment - danielbeck : I've tried providing all proper data, its still failing with same issue. No Error in UI, Logs etc. Issue found in 2.138.3 version also.

          Marcello Romani added a comment - - edited

          I have encountered the same problem.

          The fix for me was replacing a dot in the username with an underscore.

          E.g.: name.surname --> name_surname

          That is in line with what danielbeck described above, in particular:

          User name must only contain alphanumeric characters, underscore and dash

           

          Marcello Romani added a comment - - edited I have encountered the same problem. The fix for me was replacing a dot in the username with an underscore. E.g.: name.surname --> name_surname That is in line with what danielbeck described above, in particular: User name must only contain alphanumeric characters, underscore and dash  

          Observing the same with a brand new Jenkins 2.150.1 installation (on Oracle Enterprise Linux 6.8, using JRE 1.8.0_181). User name I tried was "sample".

          Andreas Fester added a comment - Observing the same with a brand new Jenkins 2.150.1 installation (on Oracle Enterprise Linux 6.8, using JRE 1.8.0_181). User name I tried was "sample".

          Leandro Guida added a comment -

          Same thing for me in version 2.150.1. Can't create  a user, no error message and no log entry.

           

          Leandro Guida added a comment - Same thing for me in version 2.150.1. Can't create  a user, no error message and no log entry.  

          Stephan Wezel added a comment - - edited

          I can reproduce the bug with 2.150.2:

          username: test.test
          pw: test
          e-mail: test@test.com

          The name doesn't follow the rules mentioned by Daniel Beck but jenkins doesn't show any error message.

          With 2.164 a proper error message is reported that the username is not valid

          Stephan Wezel added a comment - - edited I can reproduce the bug with 2.150.2: username: test.test pw: test e-mail: test@test.com The name doesn't follow the rules mentioned by Daniel Beck but jenkins doesn't show any error message. With 2.164 a proper error message is reported that the username is not valid

          Same problem here, Jenkins 2.150.2.

          Workaround was to use a username without a dot.

          Renato Chencinski added a comment - Same problem here, Jenkins 2.150.2. Workaround was to use a username without a dot.

          Daniel Beck added a comment -

          https://jenkins.io/security/advisory/2018-05-09/#SECURITY-786 explains the rationale behind the change, and provides a workaround if you need periods in your user names.

          The lack of form validation bug was fixed in JENKINS-52869, so closing this issue as a duplicate.

          Daniel Beck added a comment - https://jenkins.io/security/advisory/2018-05-09/#SECURITY-786 explains the rationale behind the change, and provides a workaround if you need periods in your user names. The lack of form validation bug was fixed in JENKINS-52869 , so closing this issue as a duplicate.

            Unassigned Unassigned
            jalle19 Foo Bar
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: