Group :: System/Configuration/Other
RPM: telegramqml
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: 0002-Fix-the-passHash-bug.patch
Download
Download
From 447defb6ee306acebc6e9f22587e5cda6500b417 Mon Sep 17 00:00:00 2001
From: Bardia Daneshvar <realbardiax@gmail.com>
Date: Sun, 24 Jul 2016 17:10:02 +0430
Subject: [PATCH 2/4] Fix the passHash bug
(cherry picked from commit f7f830baebf0795cbddfd40c168f0dd2811d4e63)
---
telegramauthenticate.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/telegramauthenticate.cpp b/telegramauthenticate.cpp
index 68945b1..cced3da 100644
--- a/telegramauthenticate.cpp
+++ b/telegramauthenticate.cpp
@@ -156,12 +156,11 @@ void TelegramAuthenticate::checkPassword(const QString &password)
const QByteArray salt = p->accountPassword.currentSalt();
QByteArray passData = salt + password.toUtf8() + salt;
- QByteArray passHash = QCryptographicHash::hash(passData, QCryptographicHash::Sha256);
switchState(AuthLoggingIn);
DEFINE_DIS;
Telegram *tg = p->engine->telegram();
- tg->authCheckPassword(passHash, [this, dis](TG_AUTH_CHECK_PASSWORD_CALLBACK){
+ tg->authCheckPassword(passData, [this, dis](TG_AUTH_CHECK_PASSWORD_CALLBACK){
Q_UNUSED(msgId)
if(!error.null) {
setError(error.errorText, error.errorCode);
--
2.9.2