Ignore:
Timestamp:
Nov 9, 2010 8:49:31 AM (3 years ago)
Author:
alec
Message:
  • Fix lack of IMAP server response in logged error message when using AUTHENTICATE PLAIN with SASL-IR
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_imap_generic.php

    r4198 r4203  
    119119    const COMMAND_NORESPONSE = 1; 
    120120    const COMMAND_CAPABILITY = 2; 
     121    const COMMAND_LASTLINE   = 4; 
    121122 
    122123    /** 
     
    492493            // RFC 4959 (SASL-IR): save one round trip 
    493494            if ($this->getCapability('SASL-IR')) { 
    494                 $result = $this->execute("AUTHENTICATE PLAIN", array($reply), 
    495                     self::COMMAND_NORESPONSE | self::COMMAND_CAPABILITY); 
     495                list($result, $line) = $this->execute("AUTHENTICATE PLAIN", array($reply), 
     496                    self::COMMAND_LASTLINE | self::COMMAND_CAPABILITY); 
    496497            } 
    497498            else { 
     
    28892890            } 
    28902891 
     2892        // return last line only (without command tag and result) 
     2893        if ($line && ($options & self::COMMAND_LASTLINE)) { 
     2894            $response = preg_replace("/^$tag (OK|NO|BAD|BYE|PREAUTH)?\s*/i", '', trim($line)); 
     2895        } 
     2896 
    28912897            return $noresp ? $code : array($code, $response); 
    28922898    } 
Note: See TracChangeset for help on using the changeset viewer.