diff options
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcmail.php | 2 | ||||
-rw-r--r-- | program/include/rcube_imap_generic.php | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index a26ad809c..c7ba41935 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -501,6 +501,8 @@ class rcmail // can save time detecting them using NAMESPACE and LIST $options = array( 'auth_method' => $this->config->get('imap_auth_type', 'check'), + 'auth_cid' => $this->config->get('imap_auth_cid'), + 'auth_pw' => $this->config->get('imap_auth_pw'), 'delimiter' => isset($_SESSION['imap_delimiter']) ? $_SESSION['imap_delimiter'] : $this->config->get('imap_delimiter'), 'rootdir' => isset($_SESSION['imap_root']) ? $_SESSION['imap_root'] : $this->config->get('imap_root'), 'debug_mode' => (bool) $this->config->get('imap_debug', 0), diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 67d71f619..4211cca44 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -420,7 +420,16 @@ class rcube_imap_generic } } else { // PLAIN - $reply = base64_encode($user . chr(0) . $user . chr(0) . $pass); + // proxy authentication + if (!empty($this->prefs['auth_cid'])) { + $authc = $this->prefs['auth_cid']; + $pass = $this->prefs['auth_pw']; + } + else { + $authc = $user; + } + + $reply = base64_encode($user . chr(0) . $authc . chr(0) . $pass); // RFC 4959 (SASL-IR): save one round trip if ($this->getCapability('SASL-IR')) { |