alecpl
2010-04-01 1820932295a2c4a8d7f716f540dbbe9327c7b28f
program/include/rcube_imap_generic.php
@@ -65,6 +65,10 @@
   public $others = array();
}
// For backward compatibility with cached messages (#1486602)
class iilBasicHeader extends rcube_mail_header
{
}
class rcube_imap_generic
{
@@ -366,7 +370,7 @@
        }
    
        // generate hash
        $hash  = md5($this->xor($pass,$opad) . pack("H*", md5($this->xor($pass, $ipad) . base64_decode($encChallenge))));
        $hash  = md5($this->_xor($pass,$opad) . pack("H*", md5($this->_xor($pass, $ipad) . base64_decode($encChallenge))));
    
        // generate reply
        $reply = base64_encode($user . ' ' . $hash);
@@ -1553,18 +1557,19 @@
       return false;   
    }
    function search($folder, $criteria)
    function search($folder, $criteria, $return_uid=false)
    {
       if (!$this->select($folder)) {
          return false;
       }
       $data = '';
       $query = "srch1 SEARCH " . chop($criteria);
       $query = 'srch1 ' . ($return_uid ? 'UID ' : '') . 'SEARCH ' . chop($criteria);
       if (!$this->putLineC($query)) {
          return false;
       }
       do {
          $line = trim($this->readLine());
          if ($this->startsWith($line, '* SEARCH')) {
@@ -2150,7 +2155,7 @@
       return $result;
    }
    private function iil_xor($string, $string2)
    private function _xor($string, $string2)
    {
       $result = '';
       $size = strlen($string);