Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.2.2
-
4.02
-
Description
when user configures JNDI SMTP configuration and enters extra space characters in the JNDI location, our application accepts it but throws an error while sending email.
Steps:
- Navigate to mail servers from admin and configure SMTP mail server using JNDI location
- Enter JNDI Location and enter some white spaces in the location field.
- Attempt to send test email and also click on SMTP log level details check box and than exception will be thrown out like:
An error has occurred with sending the test email: com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:187) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:91) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:168) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ... Caused by: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getJndiSession(SMTPMailServerImpl.java:161) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getSession(SMTPMailServerImpl.java:110) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169) ... 110 more