aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-07-21 21:12:07 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-07-21 21:12:07 +0200
commit5d2e144624c586d1fdbb1ccaf8f238d53428ab6a (patch)
tree089b8b3957df28e633891fa3f6aeb4ff767db607
parentde039dcc7cb56ed8dde36734a4f61a80bdf47cd6 (diff)
parent17c6cd3676fae4947d263fc2b80dde3a4e96f011 (diff)
downloadforums-5d2e144624c586d1fdbb1ccaf8f238d53428ab6a.tar
forums-5d2e144624c586d1fdbb1ccaf8f238d53428ab6a.tar.gz
forums-5d2e144624c586d1fdbb1ccaf8f238d53428ab6a.tar.bz2
forums-5d2e144624c586d1fdbb1ccaf8f238d53428ab6a.tar.xz
forums-5d2e144624c586d1fdbb1ccaf8f238d53428ab6a.zip
Merge branch '3.2.x' into 3.3.x
-rw-r--r--phpBB/includes/functions_messenger.php12
-rw-r--r--phpBB/language/en/acp/board.php4
2 files changed, 13 insertions, 3 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index f44bcc6fb7..7f8238e1bf 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -1581,6 +1581,14 @@ class smtp_class
*/
protected function starttls()
{
+ global $config;
+
+ // allow SMTPS (what was used by phpBB 3.0) if hostname is prefixed with tls:// or ssl://
+ if (strpos($config['smtp_host'], 'tls://') === 0 || strpos($config['smtp_host'], 'ssl://') === 0)
+ {
+ return true;
+ }
+
if (!function_exists('stream_socket_enable_crypto'))
{
return false;
@@ -1603,7 +1611,9 @@ class smtp_class
if (socket_set_blocking($this->socket, 1))
{
- $result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
+ // https://secure.php.net/manual/en/function.stream-socket-enable-crypto.php#119122
+ $crypto = (phpbb_version_compare(PHP_VERSION, '5.6.7', '<')) ? STREAM_CRYPTO_METHOD_TLS_CLIENT : STREAM_CRYPTO_METHOD_SSLv23_CLIENT;
+ $result = stream_socket_enable_crypto($this->socket, true, $crypto);
socket_set_blocking($this->socket, (int) $stream_meta['blocked']);
}
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 96897af6fd..10e76cc483 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -587,8 +587,8 @@ $lang = array_merge($lang, array(
'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP',
'SMTP_PORT' => 'SMTP server port',
'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.',
- 'SMTP_SERVER' => 'SMTP server address and protocol',
- 'SMTP_SERVER_EXPLAIN' => 'Note that you have to provide the protocol that your server uses. If you are using SSL, this has to be "ssl://your.mailserver.com"',
+ 'SMTP_SERVER' => 'SMTP server address',
+ 'SMTP_SERVER_EXPLAIN' => 'Do not provide a protocol (<samp>ssl://</samp> or <samp>tsl://</samp>) unless your mail host tells you to do so.',
'SMTP_SETTINGS' => 'SMTP settings',
'SMTP_USERNAME' => 'SMTP username',
'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',