fix(network): limit text response bodies to 4 MiB

Closes #8344
Closes #8359
This commit is contained in:
Tunglies
2026-11-08 10:18:37 +08:00
parent 51fff78287
commit 884aa24677
4 changed files with 8 additions and 0 deletions
+5
View File
@@ -228,6 +228,11 @@ impl NetworkManager {
}
};
let response: tauri::http::Response<reqwest::Body> = response.into();
let response = reqwest::Response::from(
response.map(|body| reqwest::Body::wrap(http_body_util::Limited::new(body, 4 * 1024 * 1024))),
);
let status = response.status();
let headers = response.headers().to_owned();
let body = match response.text().await {