Fix #216: The old salt should be accepted for a further 1800 seconds

This commit is contained in:
Wizou 2023-12-18 00:01:07 +01:00
parent cce7a64cd9
commit e6fa972295
3 changed files with 7 additions and 2 deletions

View file

@ -162,6 +162,7 @@ namespace WTelegram
session.AuthKeyID = BinaryPrimitives.ReadInt64LittleEndian(authKeyHash.AsSpan(12));
session.AuthKey = authKey;
session.Salt = BinaryPrimitives.ReadInt64LittleEndian(pqInnerData.new_nonce.raw) ^ BinaryPrimitives.ReadInt64LittleEndian(resPQ.server_nonce.raw);
session.OldSalt = session.Salt;
(byte[] key, byte[] iv) ConstructTmpAESKeyIV(Int128 server_nonce, Int256 new_nonce)
{