diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2009-12-02 21:27:34 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2009-12-02 21:27:34 +0000 |
commit | bbeb816cd4d7df1c3dfce11c1fa9c7a86c43932d (patch) | |
tree | 75e2f2728d2f70a794f61b907f26a89c0f431897 | |
parent | c76b743b347a71f15b2ffccb62ca2a3d22eb6d34 (diff) | |
download | neon-bbeb816cd4d7df1c3dfce11c1fa9c7a86c43932d.tar.gz |
Merge r1739, r1744, r1746, r1747 from trunk:
* config.hw.in: Fix socklen_t with recent SDKs, thanks to Stefan Kung.
* src/ne_socket.c: Fixed 'missing symbol' win2k runtime problem.
* src/ne_ntlm.c (ne__ntlm_authenticate)
* src/ne_auth.c (ntlm_challenge):
In case of session timeout, do not call auth callback; use
existing credentials.
* src/ne_ntlm.c (mkhash): Fix buffer overflow (basic@mozdev.org).
git-svn-id: http://svn.webdav.org/repos/projects/neon/branches/0.29.x@1749 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r-- | src/ne_auth.c | 2 | ||||
-rw-r--r-- | src/ne_ntlm.c | 5 | ||||
-rw-r--r-- | src/ne_socket.c | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/ne_auth.c b/src/ne_auth.c index bd2a5fe..d32d52e 100644 --- a/src/ne_auth.c +++ b/src/ne_auth.c @@ -725,7 +725,7 @@ static int ntlm_challenge(auth_session *sess, int attempt, NE_DEBUG(NE_DBG_HTTPAUTH, "auth: NTLM challenge.\n"); - if (!parms->opaque) { + if (!parms->opaque && (!sess->ntlm_context || (attempt > 1))) { char password[NE_ABUFSIZ]; if (get_credentials(sess, errmsg, attempt, parms, password)) { diff --git a/src/ne_ntlm.c b/src/ne_ntlm.c index 988fdb1..3c00e79 100644 --- a/src/ne_ntlm.c +++ b/src/ne_ntlm.c @@ -356,7 +356,7 @@ static void mkhash(char *password, MD4_Update(&md4, pw, 2*len); MD4_Final(ntbuffer, &md4); - memset(ntbuffer+16, 0, 8); + memset(ntbuffer+16, 0, 5); } calc_resp(ntbuffer, nonce, ntresp); @@ -656,6 +656,9 @@ int ne__ntlm_authenticate(ne_ntlm_context *context, const char *responseToken) if (context == NULL) { return -1; } else { + if (!responseToken && (context->state == NTLMSTATE_TYPE3)) + context->state = NTLMSTATE_NONE; + if (context->state <= NTLMSTATE_TYPE3) { ntlm ntlmstatus = ne_input_ntlm(context, responseToken); diff --git a/src/ne_socket.c b/src/ne_socket.c index 45b49e2..9e55c53 100644 --- a/src/ne_socket.c +++ b/src/ne_socket.c @@ -59,6 +59,7 @@ #include <stddef.h> #ifdef USE_GETADDRINFO #include <ws2tcpip.h> +#include <wspiapi.h> #endif #endif |