diff options
| -rw-r--r-- | phpBB/docs/events.md | 12 | ||||
| -rw-r--r-- | phpBB/includes/functions_messenger.php | 12 | ||||
| -rw-r--r-- | phpBB/language/en/acp/board.php | 4 | ||||
| -rw-r--r-- | phpBB/phpbb/event/md_exporter.php | 13 | 
4 files changed, 29 insertions, 12 deletions
| diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index c77691a048..39888bf671 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1740,14 +1740,14 @@ posting_attach_body_file_list_after  * Locations:      + styles/prosilver/template/posting_attach_body.html  * Since: 3.2.6-RC1 -* Purpose: Add content after attachments list  +* Purpose: Add content after attachments list  posting_attach_body_file_list_before  ===  * Locations:      + styles/prosilver/template/posting_attach_body.html  * Since: 3.2.6-RC1 -* Purpose: Add content before attachments list  +* Purpose: Add content before attachments list  posting_editor_add_panel_tab  === @@ -2130,14 +2130,14 @@ search_results_header_before  search_results_last_post_author_username_append  ===  * Locations: -    + styles/prosilver/template/search_results.html +    + styles/prosilver/template/search_results.html (2)  * Since: 3.2.4-RC1  * Purpose: Append information to last post author username of member  search_results_last_post_author_username_prepend  ===  * Locations: -    + styles/prosilver/template/search_results.html +    + styles/prosilver/template/search_results.html (2)  * Since: 3.2.4-RC1  * Purpose: Prepend information to last post author username of member @@ -2654,14 +2654,14 @@ ucp_register_profile_fields_before  viewforum_body_last_post_author_username_append  ===  * Locations: -    + styles/prosilver/template/viewforum_body.html +    + styles/prosilver/template/viewforum_body.html (2)  * Since: 3.2.4-RC1  * Purpose: Append information to last post author username of member  viewforum_body_last_post_author_username_prepend  ===  * Locations: -    + styles/prosilver/template/viewforum_body.html +    + styles/prosilver/template/viewforum_body.html (2)  * Since: 3.2.4-RC1  * Purpose: Prepend information to last post author username of member 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 378dd3fc38..9b637ff9d3 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.', diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php index c3942bd7ce..1a2d7c989e 100644 --- a/phpBB/phpbb/event/md_exporter.php +++ b/phpBB/phpbb/event/md_exporter.php @@ -389,9 +389,16 @@ class md_exporter  			$files = explode("\n    + ", $file_details);  			foreach ($files as $file)  			{ +				if (!preg_match('#^([^ ]+)( \([0-9]+\))?$#', $file)) +				{ +					throw new \LogicException("Invalid event instances for file '{$file}' found for event '{$this->current_event}'", 1); +				} + +				list($file) = explode(" ", $file); +  				if (!file_exists($this->path . $file) || substr($file, -5) !== '.html')  				{ -					throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 1); +					throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 2);  				}  				if (($this->filter !== 'adm') && strpos($file, 'styles/prosilver/template/') === 0) @@ -404,7 +411,7 @@ class md_exporter  				}  				else  				{ -					throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 2); +					throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 3);  				}  				$this->events_by_file[$file][] = $this->current_event; @@ -424,7 +431,7 @@ class md_exporter  		}  		else  		{ -			throw new \LogicException("Invalid file list found for event '{$this->current_event}'", 2); +			throw new \LogicException("Invalid file list found for event '{$this->current_event}'", 1);  		}  		return $files_list; | 
