Fix Issue #56: Undefined Indices in Logs
Add ssl_mode and force_caps to connection params, and correctly handle AUTHENTICATE PLAIN in putLineC to reduce warnings in logs. Signed-off-by: Scott Shambarger <devel@shambarger.net>
This commit is contained in:
committed by
Jonas Sulzer
parent
b196e0198a
commit
352dcb74a9
@@ -86,9 +86,8 @@ class OC_User_IMAP extends \OCA\user_external\Base {
|
|||||||
|
|
||||||
$params = ["port"=>$this->port, "timeout"=>10];
|
$params = ["port"=>$this->port, "timeout"=>10];
|
||||||
|
|
||||||
if ($this->sslmode !== null){
|
$params["ssl_mode"] = $this->sslmode ? $this->sslmode : null;
|
||||||
$params["ssl_mode"] = $this->sslmode;
|
$params["force_caps"] = false;
|
||||||
}
|
|
||||||
$canconnect = $rcube->connect(
|
$canconnect = $rcube->connect(
|
||||||
$this->mailbox,
|
$this->mailbox,
|
||||||
$username,
|
$username,
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class imap_rcube
|
|||||||
$res = 0;
|
$res = 0;
|
||||||
if ($parts = preg_split('/(\{[0-9]+\}\r\n)/m', $string, -1, PREG_SPLIT_DELIM_CAPTURE)) {
|
if ($parts = preg_split('/(\{[0-9]+\}\r\n)/m', $string, -1, PREG_SPLIT_DELIM_CAPTURE)) {
|
||||||
for ($i=0, $cnt=count($parts); $i<$cnt; $i++) {
|
for ($i=0, $cnt=count($parts); $i<$cnt; $i++) {
|
||||||
if (preg_match('/^\{([0-9]+)\}\r\n$/', $parts[$i+1], $matches)) {
|
if (isset($parts[$i+1]) && preg_match('/^\{([0-9]+)\}\r\n$/', $parts[$i+1], $matches)) {
|
||||||
// LITERAL+ support
|
// LITERAL+ support
|
||||||
if ($this->prefs['literal+']) {
|
if ($this->prefs['literal+']) {
|
||||||
$parts[$i+1] = sprintf("{%d+}\r\n", $matches[1]);
|
$parts[$i+1] = sprintf("{%d+}\r\n", $matches[1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user