Problem
Surfaced by PR #32 verify (security reviewer Q2). getContacts has the same
getX-per-id fan-out shape that #25 just bounded for limit — but with no
limit at all. The handler calls getContacts and then issues one getChat
(or equivalent) round-trip per returned contact id, with nothing capping the
number of ids processed.
This is strictly worse than the path #25 fixed: #25's getChats/searchChats
now reject limit > 10_000 via validateLimitCap, but getContacts iterates
the full contact list unconditionally. A large address book translates directly
into N sequential TDLib round-trips.
Type
bug (resource / fan-out amplification)
Expected
Apply the same bounding discipline as #25:
Code Reference
Source
PR #32 6-AI verify, security reviewer Q2: #32 (comment)
Related: #25 (bounded the limit fan-out paths), #22/#23 (same parser-consistency cluster)
Problem
Surfaced by PR #32 verify (security reviewer Q2).
getContactshas the samegetX-per-id fan-out shape that #25 just bounded forlimit— but with nolimit at all. The handler calls
getContactsand then issues onegetChat(or equivalent) round-trip per returned contact id, with nothing capping the
number of ids processed.
This is strictly worse than the path #25 fixed: #25's
getChats/searchChatsnow reject
limit > 10_000viavalidateLimitCap, butgetContactsiteratesthe full contact list unconditionally. A large address book translates directly
into N sequential TDLib round-trips.
Type
bug (resource / fan-out amplification)
Expected
Apply the same bounding discipline as #25:
validateLimitCap/ aparseLimit-style bound, or page the contact list)Code Reference
Sources/CheTelegramAllMCPCore/Server.swift—getContactshandler + its per-id loopSources/CheTelegramAllMCPCore/TDLibClient.swift:338-347— thegetChat-per-id fan-out pattern (same shape audited for Apply parseMaxMessages pattern to limit and other numeric option args #25)Source
PR #32 6-AI verify, security reviewer Q2: #32 (comment)
Related: #25 (bounded the
limitfan-out paths), #22/#23 (same parser-consistency cluster)