summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-12-03 19:47:31 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-12-03 19:47:31 +0300
commit3813c8e151beafef2f3e790573a59897c654b734 (patch)
tree6cd56ae5498b0ab22f2bf2adbe4f08307e0abd7b /protocols/JabberG/src/jabber_thread.cpp
parent19b9c44e888b755d16fc45cf40bf3f8e18eed572 (diff)
fixes #4074 (XEP-0480: SASL Upgrade Tasks support)
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index baa5120188..f1db58dd1e 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -709,8 +709,8 @@ void CJabberProto::OnProcessFeatures(const TiXmlElement *node, ThreadData *info)
// dunno why we need to handle that
}
}
- // else if (!mir_strcmp(c->Name(), "upgrade") && c->Attribute("xmlns", "urn:xmpp:sasl:upgrade:0"))
- // OnProcessUpgrade(c, info);
+ else if (!mir_strcmp(c->Name(), "upgrade") && c->Attribute("xmlns", "urn:xmpp:sasl:upgrade:0"))
+ OnProcessUpgrade(c, info);
}
}
else if (!mir_strcmp(pszName, "session"))
@@ -833,6 +833,9 @@ void CJabberProto::OnProcessSuccess(const TiXmlElement *node, ThreadData *info)
return;
}
+ if (m_hasSasl2 && !pszFinal && info->m_saslUpgrade)
+ pszFinal = info->m_saslUpgrade->getInitData();
+
if (!m_arAuthMechs[0].validateLogin(pszFinal)) {
info->send("</stream:stream>");
return;