Limit the number of maximum connect attempts to 1

http://php.net/manual/en/function.imap-open.php
This commit is contained in:
Toni Förster
2014-08-26 17:08:46 +02:00
parent cd5fa9860d
commit cf797fb97e

View File

@@ -42,7 +42,7 @@ class OC_User_IMAP extends \OCA\user_external\Base {
OCP\Util::writeLog('user_external', 'ERROR: PHP imap extension is not installed', OCP\Util::ERROR);
return false;
}
$mbox = @imap_open($this->mailbox, $uid, $password, OP_HALFOPEN);
$mbox = @imap_open($this->mailbox, $uid, $password, OP_HALFOPEN, 1);
imap_errors();
imap_alerts();
if($mbox !== FALSE) {