diff options
author | George Hazan <ghazan@miranda.im> | 2022-04-03 18:31:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-04-03 18:31:20 +0300 |
commit | f90e419d6684dcb9d04ab4069902c74ed1d631a7 (patch) | |
tree | e18b7f5175a13d0120b992db058e227025cd914c /protocols | |
parent | 92726664771503f7ea09786401ed0db5f52d4d78 (diff) |
fixes #3064 (Jabber: "Identity" hidden option spoofs only discovery but not user info)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_iq_handlers.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 8aaaee167c..6d0d2e099e 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -38,14 +38,22 @@ bool CJabberProto::OnIqRequestVersion(const TiXmlElement*, CJabberIqInfo *pInfo) XmlNodeIq iq("result", pInfo);
TiXmlElement *query = iq << XQUERY(JABBER_FEAT_VERSION);
- query << XCHILD("name", "Miranda NG Jabber");
- query << XCHILD("version", szCoreVersion);
-
- if (m_bShowOSVersion) {
- char os[256];
- if (!OS_GetDisplayString(os, _countof(os)))
- mir_strncpy(os, "Microsoft Windows", _countof(os));
- query << XCHILD("os", os);
+
+ CMStringA szName(getMStringA("Identity")); // hidden setting to be entered from dbeditor++
+ if (!szName.IsEmpty()) {
+ query << XCHILD("name", szName);
+ query << XCHILD("version", "0.1");
+ }
+ else {
+ query << XCHILD("name", "Miranda NG Jabber");
+ query << XCHILD("version", szCoreVersion);
+
+ if (m_bShowOSVersion) {
+ char os[256];
+ if (!OS_GetDisplayString(os, _countof(os)))
+ mir_strncpy(os, "Microsoft Windows", _countof(os));
+ query << XCHILD("os", os);
+ }
}
m_ThreadInfo->send(iq);
|