Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-12203

Specifying 'createusers=true' as Mail Service parameter allows creation of users with invalid email addresses

    XMLWordPrintable

Details

    Description

      If you have 'createusers=true' entered as a Mail Service parameter, and JIRA receives an e-mail with an invalid "from:" field (for example, a mail client dumping the persons name in there instead of an e-mail address) JIRA will go ahead and create a user with an invalid e-mail address field.

      A further problem is that JIRA will then attempt to send the newly created user a password e-mail, resulting in the following stacktrace:

      2007-02-16 11:22:00,593 Sending mailitem To='"Helge Marstrander"' Subject='Account created' From='null' FromName='null' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/plain' Encoding='UTF-8' Multipart='null' MessageId='null' ERROR [atlassian.mail.queue.MailQueueImpl] Error occurred in sending e-mail: To='"Helge Marstrander"' Subject='Account created' From='null' FromName='null' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/plain' Encoding='UTF-8' Multipart='null' MessageId='null'
      com.atlassian.mail.MailException: javax.mail.internet.AddressException: Missing '"' in string ``"Helge'' at position 6
      	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:183)
      	at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:47)
      	at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:68)
      	at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:23)
      	at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67)
      	at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: javax.mail.internet.AddressException: Missing '"' in string ``"Helge'' at position 6
      	at javax.mail.internet.InternetAddress.parse(InternetAddress.java:676)
      	at javax.mail.internet.InternetAddress.parse(InternetAddress.java:529)
      	at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:65)
      	at com.atlassian.mail.MailUtils.parseAddresses(MailUtils.java:77)
      	at com.atlassian.mail.server.impl.util.MessageCreator.updateMimeMessage(MessageCreator.java:44)
      	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:166)
      	... 7 more
      

      Instead, JIRA should not create a user with an invalid e-mail in the first place.

      Attachments

        Issue Links

          Activity

            People

              andreask@atlassian.com Andreas Knecht (Inactive)
              tim@atlassian.com TimP
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: