mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-02 12:54:18 +01:00
* EMailAdmin: disable certificate validation for Sieve, which is enabled by default in PHP 5.6
This commit is contained in:
parent
ee807027af
commit
9c007151d7
@ -152,7 +152,7 @@ class emailadmin_sieve extends Net_Sieve
|
|||||||
|
|
||||||
$useTLS = false;
|
$useTLS = false;
|
||||||
|
|
||||||
switch($_icServer->acc_sieve_ssl)
|
switch($_icServer->acc_sieve_ssl & ~emailadmin_account::SSL_VERIFY)
|
||||||
{
|
{
|
||||||
case emailadmin_account::SSL_SSL:
|
case emailadmin_account::SSL_SSL:
|
||||||
$sieveHost = 'ssl://'.$sieveHost;
|
$sieveHost = 'ssl://'.$sieveHost;
|
||||||
@ -163,6 +163,14 @@ class emailadmin_sieve extends Net_Sieve
|
|||||||
case emailadmin_account::SSL_STARTTLS:
|
case emailadmin_account::SSL_STARTTLS:
|
||||||
$useTLS = true;
|
$useTLS = true;
|
||||||
}
|
}
|
||||||
|
// disable certificate validation, if not explicitly enabled (not possible in current UI, as not supported by Horde_Imap_Client)
|
||||||
|
$options = array(
|
||||||
|
'ssl' => array(
|
||||||
|
'verify_peer' => (bool)($_icServer->acc_sieve_ssl & emailadmin_account::SSL_VERIFY),
|
||||||
|
'verify_peer_name' => (bool)($_icServer->acc_sieve_ssl & emailadmin_account::SSL_VERIFY),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
if ($euser)
|
if ($euser)
|
||||||
{
|
{
|
||||||
$username = $_icServer->acc_imap_admin_username;
|
$username = $_icServer->acc_imap_admin_username;
|
||||||
@ -187,7 +195,7 @@ class emailadmin_sieve extends Net_Sieve
|
|||||||
$this->_timeout = $timeout;
|
$this->_timeout = $timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(PEAR::isError($this->error = $this->connect($sieveHost , $sievePort, $options=null, $useTLS) ) )
|
if(PEAR::isError($this->error = $this->connect($sieveHost , $sievePort, $options, $useTLS) ) )
|
||||||
{
|
{
|
||||||
if ($this->debug)
|
if ($this->debug)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user