From b0a9d63d5ec91ffbfb48c04bc980e241c6b0d65d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 1 Feb 2019 11:28:46 +0300 Subject: Jabber: if Kerberos authentication is available, it must be preferred to the usual NTLM auth --- protocols/JabberG/src/jabber_thread.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 03cdaf12f3..4f9fc51c71 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -618,15 +618,6 @@ void CJabberProto::PerformAuthentication(ThreadData *info) } } - if (auth == nullptr && m_AuthMechs.isNtlmAvailable) { - m_AuthMechs.isNtlmAvailable = false; - auth = new TNtlmAuth(info, "NTLM"); - if (!auth->isValid()) { - delete auth; - auth = nullptr; - } - } - if (auth == nullptr && m_AuthMechs.isKerberosAvailable) { m_AuthMechs.isKerberosAvailable = false; auth = new TNtlmAuth(info, "GSSAPI", m_AuthMechs.m_gssapiHostName); @@ -643,6 +634,15 @@ void CJabberProto::PerformAuthentication(ThreadData *info) } } + if (auth == nullptr && m_AuthMechs.isNtlmAvailable) { + m_AuthMechs.isNtlmAvailable = false; + auth = new TNtlmAuth(info, "NTLM"); + if (!auth->isValid()) { + delete auth; + auth = nullptr; + } + } + if (auth == nullptr && m_AuthMechs.isScramAvailable) { m_AuthMechs.isScramAvailable = false; auth = new TScramAuth(info); -- cgit v1.2.3