[jira] [Created] (EMAIL-106) STARTTLS is only enabled if an authenticator is used

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (EMAIL-106) STARTTLS is only enabled if an authenticator is used

ASF GitHub Bot (Jira)
STARTTLS is only enabled if an authenticator is used
----------------------------------------------------

                 Key: EMAIL-106
                 URL: https://issues.apache.org/jira/browse/EMAIL-106
             Project: Commons Email
          Issue Type: Bug
            Reporter: Bruno Harbulot


The STARTTLS parameter is only set if an authenticator is used, whereas the two features are independent: it would also make sense to use STARTTLS without authentication, so as to protect eavesdropping of the e-mail content, for example.

Here is a patch for {{src/java/org/apache/commons/mail/Email.java}} (rev. 1088801):

{code}
@@ -481,9 +481,9 @@ public abstract class Email implements EmailConstants
             properties.setProperty(MAIL_HOST, this.hostName);
             properties.setProperty(MAIL_DEBUG, String.valueOf(this.debug));
 
+            properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
             if (this.authenticator != null)
             {
-                properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
                 properties.setProperty(MAIL_SMTP_AUTH, "true");
             }
{code}


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (EMAIL-106) STARTTLS is only enabled if an authenticator is used

ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/EMAIL-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066721#comment-13066721 ]

Bruno Harbulot commented on EMAIL-106:
--------------------------------------

There is a patch related to this issue in EMAIL-105 too.

> STARTTLS is only enabled if an authenticator is used
> ----------------------------------------------------
>
>                 Key: EMAIL-106
>                 URL: https://issues.apache.org/jira/browse/EMAIL-106
>             Project: Commons Email
>          Issue Type: Bug
>            Reporter: Bruno Harbulot
>
> The STARTTLS parameter is only set if an authenticator is used, whereas the two features are independent: it would also make sense to use STARTTLS without authentication, so as to protect eavesdropping of the e-mail content, for example.
> Here is a patch for {{src/java/org/apache/commons/mail/Email.java}} (rev. 1088801):
> {code}
> @@ -481,9 +481,9 @@ public abstract class Email implements EmailConstants
>              properties.setProperty(MAIL_HOST, this.hostName);
>              properties.setProperty(MAIL_DEBUG, String.valueOf(this.debug));
>  
> +            properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
>              if (this.authenticator != null)
>              {
> -                properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
>                  properties.setProperty(MAIL_SMTP_AUTH, "true");
>              }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (EMAIL-106) STARTTLS is only enabled if an authenticator is used

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/EMAIL-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Siegfried Goeschl resolved EMAIL-106.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

Thanks to Albrecht Görge and the first Vienna Hackergarden

> STARTTLS is only enabled if an authenticator is used
> ----------------------------------------------------
>
>                 Key: EMAIL-106
>                 URL: https://issues.apache.org/jira/browse/EMAIL-106
>             Project: Commons Email
>          Issue Type: Bug
>            Reporter: Bruno Harbulot
>            Assignee: Siegfried Goeschl
>             Fix For: 1.3
>
>
> The STARTTLS parameter is only set if an authenticator is used, whereas the two features are independent: it would also make sense to use STARTTLS without authentication, so as to protect eavesdropping of the e-mail content, for example.
> Here is a patch for {{src/java/org/apache/commons/mail/Email.java}} (rev. 1088801):
> {code}
> @@ -481,9 +481,9 @@ public abstract class Email implements EmailConstants
>              properties.setProperty(MAIL_HOST, this.hostName);
>              properties.setProperty(MAIL_DEBUG, String.valueOf(this.debug));
>  
> +            properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
>              if (this.authenticator != null)
>              {
> -                properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
>                  properties.setProperty(MAIL_SMTP_AUTH, "true");
>              }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira