Aseman-Land / libqtelegram-aseman-edition

Most powerfull telegram library that created using C++ and Qt. It's free and opensource and released under the GPLv3 license.
GNU General Public License v3.0
50 stars 15 forks source link

Assertion fail when secret chats are used #15

Open Dax89 opened 9 years ago

Dax89 commented 9 years ago

Some users reports crashes caused by an assertion that fails when using secret chats:

This is the interesting part of the log:

[D] InboundPkt::fetchInt:89 - fetchInt() -204906213  ( "0xf3c9611b" ) 
[F] qt_assert:2096 - ASSERT: "x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionSetMessageTTL || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionReadMessages || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionDeleteMessages || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionScreenshotMessages || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionFlushHistory || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionResend || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionNotifyLayer || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionTyping" in file ../../SailorGram/libqtelegram-ae/secret/decrypter.cpp, line 421

Looking at the Telegram documentation it seems that the server sends decryptedMessageActionRequestKey (0xf3c9611b) which is not handled.

More info: 1) https://core.telegram.org/schema/end-to-end 2) https://core.telegram.org/api/end-to-end/pfs 3) Bug report on my client (for complete log): https://github.com/Dax89/harbour-sailorgram/issues/10 4) https://github.com/Aseman-Land/libqtelegram-aseman-edition/blob/master/secret/decrypter.cpp#L414

Is there any way to handle that request?

mancvso commented 9 years ago

Same issue here

ASSERT: "x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionSetMessageTTL || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionReadMessages || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionDeleteMessages || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionScreenshotMessages || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionFlushHistory || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionResend || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionNotifyLayer || x == (qint32)DecryptedMessageAction::typeDecryptedMessageActionTyping" in file ../libqtelegram-aseman-edition/secret/decrypter.cpp, line 424