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

The regular expression to validate emails does not work correctly

      If a user has an email address such as:

       

      test.test-test@test.com

       

      The email address is marked as invalid. Maybe we should remove any regex validation?

          [JENKINS-65230] The regular expression to validate emails does not work correctly

          Pierre Beitz added a comment -

          +1 on the regexp validation, there is no way to validate an email is correct with a regexp anyway. I would suggest simply validating the field is not blank... for the rest there is a test feature to validate we can send an email to the specified adress.

          Pierre Beitz added a comment - +1 on the regexp validation, there is no way to validate an email is correct with a regexp anyway. I would suggest simply validating the field is not blank... for the rest there is a test feature to validate we can send an email to the specified adress.

          Jean-Marc Meessen added a comment - - edited

          Or just check that the string contains one (and only one) "@" and at least a "." ? 

          Jean-Marc Meessen added a comment - - edited Or just check that the string contains one (and only one) "@" and at least a "." ? 

          I think the regexp was added to avoid misprints and a bit the server injections.

          The server is itself protected thus the regexp is probably useless.

           

          Arnaud Héritier added a comment - I think the regexp was added to avoid misprints and a bit the server injections. The server is itself protected thus the regexp is probably useless.  

          Tim Jacomb added a comment -

          jm_meessen there's no requirement for a '.', an @ is the only thing you can check for and what's the point then in this case.

          the way to validate an email is to send a user an email and get a code from them...

          Tim Jacomb added a comment - jm_meessen there's no requirement for a '.', an @ is the only thing you can check for and what's the point then in this case. the way to validate an email is to send a user an email and get a code from them...

          I agree with you timja

          The real fix should be to have a 2 steps validation with a code sent by email that you should pass to validate the ownership (to avoid SPAM and misconfigurations)

          Arnaud Héritier added a comment - I agree with you timja The real fix should be to have a 2 steps validation with a code sent by email that you should pass to validate the ownership (to avoid SPAM and misconfigurations)

          to be honest, the main challenge for me is not the server part but doing such UI in Jenkins which doesn't provide a too bad UX

          Arnaud Héritier added a comment - to be honest, the main challenge for me is not the server part but doing such UI in Jenkins which doesn't provide a too bad UX

          Pierre Beitz added a comment -

          As the server is protected, I'm making the quick fix of removing this faulty validation to unblock the situation for some users.

          If we want to provide a real 2 step validation, we need to properly plan the feature.

          Pierre Beitz added a comment - As the server is protected, I'm making the quick fix of removing this faulty validation to unblock the situation for some users. If we want to provide a real 2 step validation, we need to properly plan the feature.

          Pierre Beitz added a comment -

          Released in 3.2.5

          Pierre Beitz added a comment - Released in 3.2.5

            pierrebtz Pierre Beitz
            mcardenasblanco Manuel Cardenas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: