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

Empty emailAddress causes Mailer error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      When users delete their email in user profile, the configuration file leaves an empty node in XML user configuration file

      <hudson.tasks.Mailer_-UserProperty>
      <emailAddress></emailAddress>
      </hudson.tasks.Mailer_-UserProperty>

      Jenkins then behaves like described here https://issues.jenkins-ci.org/browse/JENKINS-5625

      Can you change the hudson.tasks.Mailer.UserProperty#getAddress() implementation to the code sguuested below and this bug will be fixed:

      @Exported
      public String getAddress()

      { if (emailAddress != null && emailAddress.trim().length() > 0) return emailAddress; // try the inference logic return MailAddressResolver.resolve(user); }

      This patch checks that email setting in user profile, and ensures that empty string/setting behaves like there is no setting present and takes generates the correct email address according to valid security realm implementation (if such) or appends default suffix (if deffined).

      Thanks.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Seiji Sogabe
            Path:
            changelog.html
            core/src/main/java/hudson/tasks/Mailer.java
            http://jenkins-ci.org/commit/jenkins/72f6f684297b68be19289149d0eed3d76a88f6f5
            Log:
            [FIXED JENKINS-10300] Empty emailAddress causes Mailer error.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html core/src/main/java/hudson/tasks/Mailer.java http://jenkins-ci.org/commit/jenkins/72f6f684297b68be19289149d0eed3d76a88f6f5 Log: [FIXED JENKINS-10300] Empty emailAddress causes Mailer error.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #947
            [FIXED JENKINS-10300] Empty emailAddress causes Mailer error.

            Seiji Sogabe : 72f6f684297b68be19289149d0eed3d76a88f6f5
            Files :

            • changelog.html
            • core/src/main/java/hudson/tasks/Mailer.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #947 [FIXED JENKINS-10300] Empty emailAddress causes Mailer error. Seiji Sogabe : 72f6f684297b68be19289149d0eed3d76a88f6f5 Files : changelog.html core/src/main/java/hudson/tasks/Mailer.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Seiji Sogabe
            Path:
            changelog.html
            core/src/main/java/hudson/tasks/Mailer.java
            http://jenkins-ci.org/commit/jenkins/72f6f684297b68be19289149d0eed3d76a88f6f5
            Log:
            [FIXED JENKINS-10300] Empty emailAddress causes Mailer error.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html core/src/main/java/hudson/tasks/Mailer.java http://jenkins-ci.org/commit/jenkins/72f6f684297b68be19289149d0eed3d76a88f6f5 Log: [FIXED JENKINS-10300] Empty emailAddress causes Mailer error.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Seiji Sogabe
            Path:
            changelog.html
            core/src/main/java/hudson/tasks/Mailer.java
            http://jenkins-ci.org/commit/jenkins/72f6f684297b68be19289149d0eed3d76a88f6f5
            Log:
            [FIXED JENKINS-10300] Empty emailAddress causes Mailer error.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html core/src/main/java/hudson/tasks/Mailer.java http://jenkins-ci.org/commit/jenkins/72f6f684297b68be19289149d0eed3d76a88f6f5 Log: [FIXED JENKINS-10300] Empty emailAddress causes Mailer error.

              People

              • Assignee:
                sogabe sogabe
                Reporter:
                mstipanov Marko Stipanov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: