[PATCH]Authentication with NTLM proxy server

Robert Gruber rgruber at users.sourceforge.net
Wed Sep 27 14:00:01 BST 2006


Szombathelyi György wrote:
> Returning the same data for the LM and NTLM response? It's not good!!
> I would write:
> addBuf( rbuf, ((Auth*) rbuf.data())->ntResponse, getNTLMResponse( 
> password, ch->challengeData ) );
> addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, getLMResponse( 
> password, ch->challengeData ));
> 
> and delete the whole if () above.


So the updated patch would look like this:

--- kntlm.cpp.orig      2006-09-26 13:05:06.000000000 +0200
+++ kntlm.cpp   2006-09-27 14:51:41.000000000 +0200
@@ -158,16 +158,10 @@ bool KNTLM::getAuth( QByteArray &auth, c
 //    }
 //  } else { //if no targetinfo structure and NTLMv2 or LMv2 not forced, try 
the older methods

-    if ( KFromToLittleEndian(ch->flags) & Negotiate_NTLM ) {
-      response = getNTLMResponse( password, ch->challengeData );
-      addBuf( rbuf, ((Auth*) rbuf.data())->ntResponse, response );
-    } else {
-      if ( !forceNTLM ) {
-        response = getLMResponse( password, ch->challengeData );
-        addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response );
-      } else
-        return false;
-    }
+    response = getNTLMResponse( password, ch->challengeData );
+    addBuf( rbuf, ((Auth*) rbuf.data())->ntResponse, response );
+    response = getLMResponse( password, ch->challengeData );
+    addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response );
 //  }
   if ( !dom.isEmpty() )
     addString( rbuf, ((Auth*) rbuf.data())->domain, dom, unicode );



Cheers, Robert




More information about the kde-core-devel mailing list