ZP-1391 Support disabling multiple IMAP auth methods, log the disabled...

ZP-1391 Support disabling multiple IMAP auth methods, log the disabled methods. Released under the Affero GNU General Public License (AGPL) version 3.
parent fc251b6e
......@@ -210,5 +210,6 @@ define('SYSTEM_MIME_TYPES_MAPPING', '/etc/mime.types');
define('IMAP_MEETING_USE_CALDAV', false);
// If your IMAP server allows authenticating via GSSAPI, php-imap will not fall back properly to other authentication
// methods and you will be unable to log in. Uncomment the following line to enable use in such an environment.
// methods and you will be unable to log in. Uncomment the following line to disable that authentication method.
// Multiple methods can be specified as a comma-separated string.
// define('IMAP_DISABLE_AUTHENTICATOR', 'GSSAPI');
......@@ -70,7 +70,8 @@ class BackendIMAP extends BackendDiff implements ISearchProvider {
ZLog::Write(LOGLEVEL_WARN, sprintf("BackendIMAP(): php-mbstring module is not installed, you should install it for better encoding conversions"));
}
if (defined("IMAP_DISABLE_AUTHENTICATOR")) {
$this->imapParams = array("DISABLE_AUTHENTICATOR" => IMAP_DISABLE_AUTHENTICATOR);
ZLog::Write(LOGLEVEL_INFO, sprintf("BackendIMAP(): The following authentication methods are disabled: %s", IMAP_DISABLE_AUTHENTICATOR));
$this->imapParams = array("DISABLE_AUTHENTICATOR" => array_map('trim' ,explode(',', IMAP_DISABLE_AUTHENTICATOR)));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment