Never trust peers sticker set name in secret chats.

GitOrigin-RevId: 11f6534963920bd7c736a9cb3dcf3c73e2e68e6c
This commit is contained in:
levlam 2020-05-22 18:07:04 +03:00
parent 409796d9dd
commit 05b279bb13
1 changed files with 3 additions and 1 deletions

View File

@ -1868,7 +1868,9 @@ StickerSetId StickersManager::on_get_input_sticker_set(FileId sticker_file_id,
}
}));
}
return set_id;
// always return empty StickerSetId, because we can't trust the set_id provided by the peer in the secret chat
// the real sticker set id will be set in on_get_sticker if and only if the sticker is really from the set
return StickerSetId();
}
case telegram_api::inputStickerSetAnimatedEmoji::ID:
return add_special_sticker_set(SpecialStickerSetType(set_ptr).type_).id_;