From b0329188e1b29d16c64f770b70d46e14433a8a2f Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 23 Apr 2019 03:09:00 +0300 Subject: [PATCH] Add missed checks that methods can't be called by bots. GitOrigin-RevId: fe43ee49d12f07cae8a30a66bdb956d4064fec25 --- td/telegram/Td.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 1f2d432b0..d31e3c6f1 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -4773,6 +4773,7 @@ void Td::on_request(uint64 id, td_api::createTemporaryPassword &request) { } void Td::on_request(uint64 id, td_api::processPushNotification &request) { + CHECK_IS_USER(); CLEAN_INPUT_STRING(request.payload_); CREATE_OK_REQUEST_PROMISE(); send_closure(G()->notification_manager(), &NotificationManager::process_push_notification, @@ -7021,11 +7022,13 @@ void Td::on_request(uint64 id, td_api::getDeepLinkInfo &request) { } void Td::on_request(uint64 id, const td_api::getApplicationConfig &request) { + CHECK_IS_USER(); CREATE_REQUEST_PROMISE(); create_handler(std::move(promise))->send(); } void Td::on_request(uint64 id, td_api::saveApplicationLogEvent &request) { + CHECK_IS_USER(); CLEAN_INPUT_STRING(request.type_); auto result = convert_json_value(std::move(request.data_)); CREATE_OK_REQUEST_PROMISE();