Changeset 39508cb in github
- Timestamp:
- Feb 2, 2008 12:50:06 PM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- df0da2e0
- Parents:
- fa0152c
- File:
-
- 1 edited
-
program/lib/imap.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/lib/imap.inc
r06583c3 r39508cb 259 259 260 260 // generate hash 261 $hash = md5(iil_xor($pass,$opad) . pack("H*",md5(iil_xor($pass, $ipad) . base64_decode($encChallenge)))); 261 $hash = iil_xor($pass,$opad); 262 $hash .= pack("H*",md5(iil_xor($pass, $ipad) . base64_decode($encChallenge))); 263 $hash = md5($hash); 262 264 263 265 // generate reply 264 $reply = base64_encode( $user . ' ' . $hash);266 $reply = base64_encode('"' . $user . '" "' . $hash . '"'); 265 267 266 268 // send result, get reply 267 fputs($conn->fp, $reply ."\r\n");269 fputs($conn->fp, $reply . "\r\n"); 268 270 $line = iil_ReadLine($conn->fp, 1024); 269 271 … … 274 276 return $conn->fp; 275 277 } 276 $conn->error .= 'Authentication for ' .$user.' failed (AUTH): "';278 $conn->error .= 'Authentication for ' . $user . ' failed (AUTH): "'; 277 279 $conn->error .= htmlspecialchars($line) . '"'; 278 280 $conn->errorNum = -2; … … 499 501 500 502 if ($line[0] == "+") { 501 $conn->message.='Got challenge: '.htmlspecialchars($line)."\n"; 503 $conn->message .= 'Got challenge: ' . htmlspecialchars($line)."\n"; 504 502 505 //got a challenge string, try CRAM-5 503 506 $result = iil_C_Authenticate($conn, $user, $password, substr($line,2)); 504 $conn->message.= "Tried CRAM-MD5: $result \n"; 507 508 $conn->message .= "Tried CRAM-MD5: $result \n"; 505 509 } else { 506 $conn->message.='No challenge ('.htmlspecialchars($line)."), try plain\n"; 507 $auth = "plain"; 510 $conn->message .='No challenge ('.htmlspecialchars($line)."), try plain\n"; 511 512 $auth = 'plain'; 508 513 } 509 514 }
Note: See TracChangeset
for help on using the changeset viewer.
