mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-19 07:00:14 +01:00
[ticket/13558] Change options prefix and add settings precautions.
PHPBB3-13558
This commit is contained in:
parent
2cc9b6a857
commit
22b8632426
@ -454,9 +454,9 @@ class acp_board
|
||||
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
|
||||
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
|
||||
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true),
|
||||
'ssl_verify_peer' => array('lang' => 'SSL_VERIFY_PEER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'ssl_verify_peer_name' => array('lang' => 'SSL_VERIFY_PEER_NAME', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'ssl_allow_self_signed' => array('lang' => 'SSL_ALLOW_SELF_SIGNED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'smtp_verify_peer' => array('lang' => 'SMTP_VERIFY_PEER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'smtp_verify_peer_name' => array('lang' => 'SMTP_VERIFY_PEER_NAME', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'smtp_allow_self_signed'=> array('lang' => 'SMTP_ALLOW_SELF_SIGNED','validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
|
@ -1048,9 +1048,9 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
|
||||
$collector->install();
|
||||
|
||||
$options = array();
|
||||
$verify_peer = (bool) $config['ssl_verify_peer'];
|
||||
$verify_peer_name = (bool) $config['ssl_verify_peer_name'];
|
||||
$allow_self_signed = (bool) $config['ssl_allow_self_signed'];
|
||||
$verify_peer = (bool) $config['smtp_verify_peer'];
|
||||
$verify_peer_name = (bool) $config['smtp_verify_peer_name'];
|
||||
$allow_self_signed = (bool) $config['smtp_allow_self_signed'];
|
||||
$remote_socket = $config['smtp_host'] . ':' . $config['smtp_port'];
|
||||
|
||||
// Set ssl context options, see http://php.net/manual/en/context.ssl.php
|
||||
|
@ -558,6 +558,8 @@ $lang = array_merge($lang, array(
|
||||
'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all emails the board sends.',
|
||||
'ENABLE_EMAIL' => 'Enable board-wide emails',
|
||||
'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no emails will be sent by the board at all. <em>Note the user and admin account activation settings require this setting to be enabled. If currently using “user” or “admin” activation in the activation settings, disabling this setting will disable registration.</em>',
|
||||
'SMTP_ALLOW_SELF_SIGNED' => 'Allow self-signed SSL certificates',
|
||||
'SMTP_ALLOW_SELF_SIGNED_EXPLAIN'=> 'Allow connections to SMTP server with self-signed SSL certificate.<em><strong>Warning:</strong> Allowing self-signed SSL certificates may cause security implications.</em>',
|
||||
'SMTP_AUTH_METHOD' => 'Authentication method for SMTP',
|
||||
'SMTP_AUTH_METHOD_EXPLAIN' => 'Only used if a username/password is set, ask your provider if you are unsure which method to use.',
|
||||
'SMTP_CRAM_MD5' => 'CRAM-MD5',
|
||||
@ -574,13 +576,10 @@ $lang = array_merge($lang, array(
|
||||
'SMTP_SETTINGS' => 'SMTP settings',
|
||||
'SMTP_USERNAME' => 'SMTP username',
|
||||
'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',
|
||||
|
||||
'SSL_ALLOW_SELF_SIGNED' => 'Allow self-signed certificates',
|
||||
'SSL_ALLOW_SELF_SIGNED_EXPLAIN' => 'Allow self-signed certificates for SSL / TLS connections.',
|
||||
'SSL_VERIFY_PEER' => 'Verify peer',
|
||||
'SSL_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used.',
|
||||
'SSL_VERIFY_PEER_NAME' => 'Verify peer name',
|
||||
'SSL_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for SSL / TLS connections.',
|
||||
'SMTP_VERIFY_PEER' => 'Verify SSL certificate',
|
||||
'SMTP_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used by SMTP server.<em><strong>Warning:</strong> Connecting peers with unverified SSL certificates may cause security implications.</em>',
|
||||
'SMTP_VERIFY_PEER_NAME' => 'Verify SMTP peer name',
|
||||
'SMTP_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for SMTP servers using SSL / TLS connections.<em><strong>Warning:</strong> Connecting to unverified peers may cause security implications.</em>',
|
||||
|
||||
'USE_SMTP' => 'Use SMTP server for email',
|
||||
'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send email via a named server instead of the local mail function.',
|
||||
|
@ -24,9 +24,9 @@ class add_smtp_ssl_context_config_options extends \phpbb\db\migration\migration
|
||||
{
|
||||
return array(
|
||||
// See http://php.net/manual/en/context.ssl.php
|
||||
array('config.add', array('ssl_verify_peer', 1)),
|
||||
array('config.add', array('ssl_verify_peer_name', 1)),
|
||||
array('config.add', array('ssl_allow_self_signed', 0)),
|
||||
array('config.add', array('smtp_verify_peer', 1)),
|
||||
array('config.add', array('smtp_verify_peer_name', 1)),
|
||||
array('config.add', array('smtp_allow_self_signed', 0)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user