Changeset d6584f7 in github
- Timestamp:
- Jan 19, 2010 8:17:48 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- a7dba854
- Parents:
- 638fb8a
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/lib/imap.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r96b679d rd6584f7 2 2 =========================== 3 3 4 - Use PLAIN auth when CRAM fails and imap_auth_type='check' (#1486371) 4 5 - Fix removal of <title> tag from HTML messages (#1486432) 5 6 - Fix 'force_https' to specified port when URL contains a port number (#1486411) -
program/lib/imap.inc
raa16b4a rd6584f7 648 648 } 649 649 650 $conn->message .= $line . "\n";650 $conn->message .= $line; 651 651 652 652 // TLS connection … … 673 673 } 674 674 675 $orig_method = $auth_method; 676 675 677 if ($auth_method == 'CHECK') { 676 // check for supported auth methods678 // check for supported auth methods 677 679 if (iil_C_GetCapability($conn, 'AUTH=CRAM-MD5') || iil_C_GetCapability($conn, 'AUTH=CRAM_MD5')) { 678 680 $auth_method = 'AUTH'; 679 681 } 680 682 else { 681 // default to plain text auth683 // default to plain text auth 682 684 $auth_method = 'PLAIN'; 683 685 } … … 685 687 686 688 if ($auth_method == 'AUTH') { 687 // do CRAM-MD5 authentication689 // do CRAM-MD5 authentication 688 690 iil_PutLine($conn->fp, "a000 AUTHENTICATE CRAM-MD5"); 689 691 $line = trim(iil_ReadLine($conn->fp, 1024)); 690 692 691 693 if ($line[0] == '+') { 692 // got a challenge string, try CRAM-5694 // got a challenge string, try CRAM-MD5 693 695 $result = iil_C_Authenticate($conn, $user, $password, substr($line,2)); 694 696 695 697 // stop if server sent BYE response 696 if ($result == -3) {698 if ($result == -3) { 697 699 $iil_error = $conn->error; 698 700 $iil_errornum = $conn->errorNum; 699 701 return false; 700 702 } 701 $conn->message .= "AUTH CRAM-MD5: $result\n";702 } else {703 $conn->message .= "AUTH CRAM-MD5: failed\n";703 } 704 705 if (!is_resource($result) && $orig_method == 'CHECK') { 704 706 $auth_method = 'PLAIN'; 705 707 } 706 708 } 707 709 708 if ( !$result ||$auth_method == 'PLAIN') {709 // do plain text auth710 if ($auth_method == 'PLAIN') { 711 // do plain text auth 710 712 $result = iil_C_Login($conn, $user, $password); 711 $conn->message .= "AUTH PLAIN: $result\n"; 712 } 713 714 if (!is_int($result)) { 713 } 714 715 if (is_resource($result)) { 715 716 iil_C_Namespace($conn); 716 717 return $conn;
Note: See TracChangeset
for help on using the changeset viewer.
