-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Deal with opportunistic TLS change in PHPMailer 5.2.10 #9528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deal with opportunistic TLS change in PHPMailer 5.2.10 #9528
Conversation
|
I don't agree with this approach as it's an all or nothing change. You're disabling it for everyone even if they do have a valid configuration and things work correctly if TLS security isn't explicitly set up otherwise. It's on par with saying that since CentOS 5 servers won't work with the current update system CDN when they disable support for older protocols that nobody can have secure connections to the update server. |
|
Maybe i misunderstood but this doesnt disable TLS if it is explicitly set in the config. It only disables the guesswork |
|
I think disabling it is fine. It's kind of a strange feature to be honest. It creates issues which are very hard to track down. If I set up my system to not use TLS, I expect it to not use it and not magically use it neverthless. |
|
Right, it disables enhancing to TLS if the server reports that it is able to support it. PHPMailer probably shouldn't bump up though if it requires extra configuration that isn't set in the class that would be set otherwise if you explicitly enable the TLS security option. We too often take a stance that it's Joomla's responsibility to mask server configuration issues or bugs in third party libraries. This is another PR in that direction. If a server broadcasts that it supports TLS then fails when you try to use it that's a server configuration error, not a Joomla error. If the auto-TLS upgrade fails because PHPMailer needs more info to use it that's a PHPMailer issue, not a Joomla issue. But, go ahead and merge this. It sounds like the decision is made already. |
|
i agree 100% that we should not do anything just because a server is badly
setup but reading phpmailer's own wiki and issue tracker this is a feature
even they are not too happy with
|
|
They should pull it or default it to off then if it's really THAT buggy. |
|
Perhaps they should but we know how reluctant developers can be to remove a
cool and clever feature ;) ;)
|
|
Updated the PR to try with TLS, if it fails, it will try sending it without TLS. Zero configuration :) |
|
In general, a better idea. Still tricky because they only throw one Exception type for all errors. I'd say check if As for other improvements, see #9530 |
|
@mbabker Good point on adding the check. I have added it in. Thanks. |
Deal with opportunistic TLS change in PHPMailer 5.2.10
|
Hi, Line 120 $this->SMTPAutoTLS = false; |
|
That change disables SSL verification in full. PHP 5.6+ by default On Thursday, April 14, 2016, cjsdfw [email protected] wrote:
|
Pull Request for Issue #9373
Summary of Changes
PHPMailer 5.2.10 introduced a new feature called Opportunistic TLS, this will see if a server advertises TLS encryption. If it does, a secure connection will be established. This is only possible if the server has been setup correctly and uses correct certificates. If the server has invalid certificates, the mail sending will fail.
Testing Instructions