Details
-
Bug
-
Resolution: Not a bug
-
Medium
-
None
Description
I was looking through the source code for com.atlassian.jira.service.util.handler.AbstractMessageHandler when looking into a customer's problem of duplicate users being created when creating issues from email with createusers=true
In AbstractMessageHandler there is no immediate evidence in getAuthorFromSender() or in the methods it calls, findUserByEmail() or findUserByUsername(), that either the strings from the database or from the incoming email are being trimmed.
Thus, if there are blank characters around the email address from the database or from the email, then perhaps we are failing to find an existing user.
I must confess that I have not chased this further into the lower level methods in other source code repositories other than the JIRA code, that is, in the following methods:
- com.atlassian.mail.MailUtils.getSenders()
- com.atlassian.core.user.UserUtils.getUser()
- com.opensymphony.user.User.getEmail()
Please note that this is not necessarily the problem that my support customer is having. I have not yet proved that the customer has extra spaces in the database or email addresses, etc. I'm just raising a potential issue in the code, or an area where the code might perhaps be improved.
Please forgive me if I am off the mark here and the strings are being trimmed somewhere where I have not looked.
Nor have I established whether it is even possible to store blank characters around email addresses in the database, or extract blank characters around email addresses in the email.
Cheers,
Ian