[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kio/misc/kntlm
From: Simone Gotti <simone.gotti () email ! it>
Date: 2005-06-15 15:27:04
Message-ID: 1118849224.680581.14577.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 425781 by sgotti:
Fix wrong auth string sent to server for NTLMv2, patch from Szombathelyi György.
CCBUG: 93454
M +4 -4 kntlm.cpp
--- trunk/KDE/kdelibs/kio/misc/kntlm/kntlm.cpp #425780:425781
@@ -1,5 +1,5 @@
/* This file is part of the KDE libraries
- Copyright (c) 2004 Szombathelyi György <gyurco@freemail.hu>
+ Copyright (c) 2004 Szombathelyi Gy�gy <gyurco@freemail.hu>
The implementation is based on the documentation and sample code
at http://davenport.sourceforge.net/ntlm.html
@@ -77,10 +77,10 @@
void KNTLM::addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data )
{
- secbuf.offset = buf.size();
+ secbuf.offset = (buf.size() + 1) & 0xfffffffe;
secbuf.len = data.size();
secbuf.maxlen = data.size();
- buf.resize( buf.size() + data.size() );
+ buf.resize( secbuf.offset + data.size() );
memcpy( buf.data() + secbuf.offset, data.data(), data.size() );
}
@@ -130,7 +130,7 @@
((Auth*) rbuf.data())->flags = ch->flags;
QByteArray targetInfo = getBuf( challenge, ch->targetInfo );
- if ( forceNTLMv2 || !targetInfo.isEmpty() /* may support NTLMv2 */ ) {
+ if ( forceNTLMv2 || (!targetInfo.isEmpty() && (ch->flags & Negotiate_Target_Info)) \
/* may support NTLMv2 */ ) { if ( ch->flags & Negotiate_NTLM ) {
if ( targetInfo.isEmpty() ) return false;
response = getNTLMv2Response( dom, user, password, targetInfo, \
ch->challengeData );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic