fix: do not load webxdc icon if it has too large dimensions

BREAKING CHANGE: get_webxdc_blob() may fail to load icon.png or icon.jpg if image dimensions are too large.

The issue is discovered by https://github.com/Sergei768
This commit is contained in:
link2xt
2026-09-03 10:12:24 +00:00
committed by l
parent a516829171
commit 506a78b5d4
5 changed files with 81 additions and 1 deletions

View File

@@ -2227,6 +2227,9 @@ impl CommandApi {
/// Get blob encoded as base64 from a webxdc message
///
/// path is the path of the file within webxdc archive
///
/// If the file is `icon.png` or `icon.jpg`,
/// loading it may fail if dimensions are unexpectedly large.
async fn get_webxdc_blob(
&self,
account_id: u32,