Don't attempt to use opportunistic TLS when connecting to localhost
This commit is contained in:
parent
b7dd089735
commit
c87abc860c
|
|
@ -1,5 +1,9 @@
|
|||
# PHPMailer Change Log
|
||||
|
||||
## WIP
|
||||
* Don't attempt opportunistic TLS when connecting to localhost
|
||||
* Update example to show a better way of using an SMTP subclass
|
||||
|
||||
## Version 6.8.1 (August 29th, 2023)
|
||||
* Don't reflect malformed DSNs in error messages to avert any risk of XSS
|
||||
* Improve Simplified Chinese, Sinhalese, and Norwegian translations
|
||||
|
|
|
|||
|
|
@ -2191,10 +2191,11 @@ class PHPMailer
|
|||
$this->smtp->hello($hello);
|
||||
//Automatically enable TLS encryption if:
|
||||
//* it's not disabled
|
||||
//* we are not connecting to localhost
|
||||
//* we have openssl extension
|
||||
//* we are not already using SSL
|
||||
//* the server offers STARTTLS
|
||||
if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) {
|
||||
if ($this->SMTPAutoTLS && $this->Host !== 'localhost' && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) {
|
||||
$tls = true;
|
||||
}
|
||||
if ($tls) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue