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

emails in CC aren't encoded

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      cloudbees-jenkins-advisor 3.2.4

      Description

      Emails defined in CC aren't encoded when sent to the server. It means that characters like + for aliases are wrongly interpreted as space

      The url is built here : https://github.com/jenkinsci/cloudbees-jenkins-advisor-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/advisor/client/AdvisorClient.java#L75-L78

      It’s using: https://github.com/jenkinsci/cloudbees-jenkins-advisor-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/advisor/client/AdvisorClientConfig.java#L50-L60

      And it’s manually handling the encoding here: https://github.com/jenkinsci/cloudbees-jenkins-advisor-plugin/blob/30d1df36b4f9de4ef6308b6873a6d0eaa1aa97ad/src/main/java/com/cloudbees/jenkins/plugins/advisor/utils/EmailUtil.java#L19-L24

      only the CC parameter is “encoded” and this encoding function is just taking care to replace comas to separate emails

        Attachments

          Activity

          Hide
          dduportal Damien Duportal added a comment -

          Use case where it fails: when using an email with a character `+` as the Gmail built-in aliases.

          In my case, I have my personal email "foo@gmail.com" and I wanted to use the alias "foo+jenkins@gmail.com" as Cc.

          • In the UI I got a validation error "invalid email":

          • When using JCasC configuration, I got the following warning in the logs:
          WARNING c.c.j.p.a.AdvisorGlobalConfiguration#lambda$isValid$3: cc "foo+jenkins@gmail.com" is not valid
          
          Show
          dduportal Damien Duportal added a comment - Use case where it fails: when using an email with a character `+` as the Gmail built-in aliases. In my case, I have my personal email "foo@gmail.com" and I wanted to use the alias "foo+jenkins@gmail.com" as Cc. In the UI I got a validation error "invalid email": When using JCasC configuration, I got the following warning in the logs: WARNING c.c.j.p.a.AdvisorGlobalConfiguration#lambda$isValid$3: cc "foo+jenkins@gmail.com" is not valid
          Hide
          aheritier Arnaud Héritier added a comment -

          Damien Duportal Are you using the latest version ?

          It is strange because I cannot reproduce the email validation issue

          And It is supposed to be authorized : https://github.com/jenkinsci/cloudbees-jenkins-advisor-plugin/blob/master/src/test/java/com/cloudbees/jenkins/plugins/advisor/utils/EmailValidatorTest.java#L18

          Show
          aheritier Arnaud Héritier added a comment - Damien Duportal  Are you using the latest version ? It is strange because I cannot reproduce the email validation issue And It is supposed to be authorized :  https://github.com/jenkinsci/cloudbees-jenkins-advisor-plugin/blob/master/src/test/java/com/cloudbees/jenkins/plugins/advisor/utils/EmailValidatorTest.java#L18
          Show
          aheritier Arnaud Héritier added a comment - PR:  https://github.com/jenkinsci/cloudbees-jenkins-advisor-plugin/pull/95
          Show
          aheritier Arnaud Héritier added a comment - https://github.com/jenkinsci/cloudbees-jenkins-advisor-plugin/releases/tag/cloudbees-jenkins-advisor-3.2.4

            People

            Assignee:
            aheritier Arnaud Héritier
            Reporter:
            aheritier Arnaud Héritier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: