summaryrefslogtreecommitdiff
path: root/protocols/Icq10/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Icq10/src/server.cpp')
-rw-r--r--protocols/Icq10/src/server.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Icq10/src/server.cpp b/protocols/Icq10/src/server.cpp
index 7b154ba4c7..be3e9941dd 100644
--- a/protocols/Icq10/src/server.cpp
+++ b/protocols/Icq10/src/server.cpp
@@ -136,11 +136,12 @@ void CIcqProto::OnCheckPassword(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*)
m_szAToken = ptrA(mir_urlDecode(m_szAToken));
setString("AToken", m_szAToken);
- CMStringA m_szSessionSecret = data["sessionSecret"].as_mstring();
+ CMStringA szSessionSecret = data["sessionSecret"].as_mstring();
+ CMStringA szPassTemp = m_szPassword;
unsigned int len;
BYTE hashOut[MIR_SHA256_HASH_SIZE];
- HMAC(EVP_sha256(), m_szPassword, (int)mir_strlen(m_szPassword), (BYTE*)m_szSessionSecret.c_str(), m_szSessionSecret.GetLength(), hashOut, &len);
+ HMAC(EVP_sha256(), szPassTemp, szPassTemp.GetLength(), (BYTE*)szSessionSecret.c_str(), szSessionSecret.GetLength(), hashOut, &len);
m_szSessionKey = ptrA(mir_base64_encode(hashOut, sizeof(hashOut)));
setString("SessionKey", m_szSessionKey);