Commit 2fdcbe84 authored by Dawit Alemayehu's avatar Dawit Alemayehu
Browse files

By default support only NTLMv1 like other browsers. However, make it possible

for users to manually enable the usage of NTLMv2 authentication by adding a
"EnableNTLMv2Auth=true" flag to either one of the following to configuration files:

$KDEHOME/share/config/kioslaverc OR
$KDEHOME/share/config/kio_httprc

Note this setting like every other ioslave setting can be set on a per site
basis by adding the parameter to a host specific section instead of the global
one. For example,

[foo.bar]
EnableNTLMv2Auth=true

CCBUG: 232626

(cherry picked from commit f79aacfc)
parent 15a02e74
......@@ -607,8 +607,13 @@ void KHttpNtlmAuthentication::generateResponse(const QString &_user, const QStri
m_forceKeepAlive = true;
const QByteArray challenge = QByteArray::fromBase64(m_challenge[0]);
if (!KNTLM::getAuth(buf, challenge, user, password, domain, QHostInfo::localHostName(),
(KNTLM::Force_V1 | KNTLM::Add_LM))) {
KNTLM::AuthFlags flags = KNTLM::Add_LM;
if (!m_config || !m_config->readEntry("EnableNTLMv2Auth", false)) {
flags |= KNTLM::Force_V1;
}
if (!KNTLM::getAuth(buf, challenge, user, password, domain, QHostInfo::localHostName(), flags)) {
kWarning(7113) << "Error while constructing Type 3 NTLM authentication request";
m_isError = true;
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment