Changeset 4137 in subversion
- Timestamp:
- Oct 26, 2010 4:43:23 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_imap_generic.php
r4136 r4137 513 513 // optional CAPABILITY response 514 514 if ($line && preg_match('/\[CAPABILITY ([^]]+)\]/i', $line, $matches)) { 515 $this->parseCapability($matches[1] );515 $this->parseCapability($matches[1], true); 516 516 } 517 517 return $this->fp; … … 539 539 // re-set capabilities list if untagged CAPABILITY response provided 540 540 if (preg_match('/\* CAPABILITY (.+)/i', $response, $matches)) { 541 $this->parseCapability($matches[1] );541 $this->parseCapability($matches[1], true); 542 542 } 543 543 … … 747 747 // RFC3501 [7.1] optional CAPABILITY response 748 748 if (preg_match('/\[CAPABILITY ([^]]+)\]/i', $line, $matches)) { 749 $this->parseCapability($matches[1]); 750 $this->capability_readed = true; 749 $this->parseCapability($matches[1], true); 751 750 } 752 751 … … 796 795 } 797 796 797 // pre-login capabilities can be not complete 798 $this->capability_readed = false; 799 798 800 // Authenticate 799 801 foreach ($auth_methods as $method) { … … 819 821 if (is_resource($result)) { 820 822 if ($this->prefs['force_caps']) { 821 // forget current capabilities822 823 $this->clearCapability(); 823 } else {824 // pre-login capabilities can be not complete825 $this->capability_readed = false;826 824 } 827 825 $this->getRootDir(); … … 2859 2857 && preg_match('/\[CAPABILITY ([^]]+)\]/i', $line, $matches) 2860 2858 ) { 2861 $this->parseCapability($matches[1] );2859 $this->parseCapability($matches[1], true); 2862 2860 } 2863 2861 … … 3000 2998 } 3001 2999 3002 private function parseCapability($str )3000 private function parseCapability($str, $trusted=false) 3003 3001 { 3004 3002 $str = preg_replace('/^\* CAPABILITY /i', '', $str); … … 3008 3006 if (!isset($this->prefs['literal+']) && in_array('LITERAL+', $this->capability)) { 3009 3007 $this->prefs['literal+'] = true; 3008 } 3009 3010 if ($trusted) { 3011 $this->capability_readed = true; 3010 3012 } 3011 3013 }
Note: See TracChangeset
for help on using the changeset viewer.
