Here is my fix that appear to works with PHP, to add in the top of the page:
# Empty POST NTLM IE
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$header = apache_request_headers();
$aAuth = isset($header['Authorization']) ? $header['Authorization'] : null;
if (($aAuth != null) && (substr($aAuth,0,5) == 'NTLM ')) {
$msg = base64_decode(substr($aAuth,5));
if ($msg[8] == "\x01") {
$msg2 = "NTLMSSP\x00\x02\x00\x00\x00".
"\x00\x00\x00\x00".
"\x00\x00\x00\x00".
"\x01\x02\x81\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00";
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: NTLM '.trim(base64_encode($msg2)));
exit;
}
}
}
Regards,
Emmanuel
Le Jeu 19 Juin 2008 15:55:17, DAMI a écrit :
Show quoted text> for urls authentified with Apache2::AuthenNTLM::Cookie, the content of
> POST requests is corrupted .
>
> Hypothesis : probably the input stream is left in an incorrect state
> after the cookie handling code. Maybe this has to do with
> Apache2::Cookie (which relies on libaprequest) being used in an early
> Apache phase. No idea how to fix this, except perhaps write code by
> hand to deal with cookie headers.