summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-12-14 15:39:34 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-12-14 15:39:34 (GMT)
commite2b42a54ddd25e4ceb76b4aeb7de1ffb971feb83 (patch)
treebf9233a1881b5c6d1a37b7c042f55e96376a4786
parentf1066ac7a895b028e2459d60bc7e8013a9369cfe (diff)
parent9dd2051ba6d9575f7a5a6a0746e1d0d1a1e5efe6 (diff)
downloadQt-e2b42a54ddd25e4ceb76b4aeb7de1ffb971feb83.zip
Qt-e2b42a54ddd25e4ceb76b4aeb7de1ffb971feb83.tar.gz
Qt-e2b42a54ddd25e4ceb76b4aeb7de1ffb971feb83.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: Default to QDir::homePath() in Symbian native file dialogs Fix NTLM authentication with email address Fix null pointer dereference in NTLM authentication
-rw-r--r--src/gui/dialogs/qfiledialog_symbian.cpp4
-rw-r--r--src/network/access/qnetworkaccessauthenticationmanager.cpp7
-rw-r--r--src/network/kernel/qauthenticator.cpp11
3 files changed, 10 insertions, 12 deletions
diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp
index 1ffbf1d..01c7b9b 100644
--- a/src/gui/dialogs/qfiledialog_symbian.cpp
+++ b/src/gui/dialogs/qfiledialog_symbian.cpp
@@ -143,8 +143,8 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st
tryCount = 0;
} else {
// Symbian native file dialog doesn't allow accessing files outside C:/Data
- // It will always leave in that case, so default into QDir::rootPath() in error cases.
- QString dir = QDir::toNativeSeparators(QDir::rootPath());
+ // It will always leave in that case, so default into QDir::homePath() in error cases.
+ QString dir = QDir::toNativeSeparators(QDir::homePath());
startFolder = qt_QString2TPtrC(dir);
}
}
diff --git a/src/network/access/qnetworkaccessauthenticationmanager.cpp b/src/network/access/qnetworkaccessauthenticationmanager.cpp
index 1b15cf9..b618ccc 100644
--- a/src/network/access/qnetworkaccessauthenticationmanager.cpp
+++ b/src/network/access/qnetworkaccessauthenticationmanager.cpp
@@ -283,9 +283,12 @@ QNetworkAccessAuthenticationManager::fetchCachedCredentials(const QUrl &url,
QNetworkAuthenticationCache *auth =
static_cast<QNetworkAuthenticationCache *>(authenticationCache.requestEntryNow(cacheKey));
- QNetworkAuthenticationCredential cred = *auth->findClosestMatch(url.path());
+ QNetworkAuthenticationCredential *cred = auth->findClosestMatch(url.path());
+ QNetworkAuthenticationCredential ret;
+ if (cred)
+ ret = *cred;
authenticationCache.releaseEntry(cacheKey);
- return cred;
+ return ret;
}
void QNetworkAccessAuthenticationManager::clearCache()
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 0423e22..7b63567 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -220,12 +220,6 @@ void QAuthenticator::setUser(const QString &user)
d->userDomain = user.left(separatorPosn);
d->extractedUser = user.mid(separatorPosn + 1);
d->user = user;
- } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) {
- //domain name is present
- d->realm.clear();
- d->userDomain = user.mid(separatorPosn + 1);
- d->extractedUser = user.left(separatorPosn);
- d->user = user;
} else {
d->extractedUser = user;
d->user = user;
@@ -1381,8 +1375,9 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
int offset = QNtlmPhase3BlockBase::Size;
Q_ASSERT(QNtlmPhase3BlockBase::Size == sizeof(QNtlmPhase3BlockBase));
-
- if(ctx->userDomain.isEmpty()) {
+
+ // for kerberos style user@domain logins, NTLM domain string should be left empty
+ if (ctx->userDomain.isEmpty() && !ctx->extractedUser.contains(QLatin1Char('@'))) {
offset = qEncodeNtlmString(pb.domain, offset, ch.targetNameStr, unicode);
pb.domainStr = ch.targetNameStr;
} else {