SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-1002

Email send fails if username/password are blank

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EMAIL-0.1
    • Fix Version/s: EMAIL-0.2
    • Component/s: Email
    • Labels:
      None
    • Environment:
      linux (centos 5.5) trying to send through exchange
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      If username/password is left empty, the app still tries to use them to authenticate against the mail server. Some mailservers are configured to accept anonymous sends from certain IP ranges and won't accept authentication from that range (read: I don't have a user that I'm willing to put credentials visible for, and my build server is allowed to anonymously send messages through our exchange server).

      Relatively easy fix, if both the username & password are empty, don't try using them at all. Per the docs for SimpleEmail, authentication won't be used if .setAuthentication isn't called (http://commons.apache.org/email/apidocs/org/apache/commons/mail/Email.html#setAuthentication%28java.lang.String,%20java.lang.String%29)

      1. fix.txt
        0.7 kB
        Matthew Hildebrand

        Activity

        Hide
        Matthew Hildebrand added a comment -

        Sorry, forgot Jira mangles whitespace...

        Show
        Matthew Hildebrand added a comment - Sorry, forgot Jira mangles whitespace...
        Hide
        Evgeny Mandrikov added a comment -

        Patch was applied with small modification in r3388. Thanks for contribution.

        Show
        Evgeny Mandrikov added a comment - Patch was applied with small modification in r3388 . Thanks for contribution.

          People

          • Assignee:
            Evgeny Mandrikov
            Reporter:
            Matthew Hildebrand
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: