kewe63
c60952ba94
fix(web): run URL SSRF checks off the event loop in async paths
...
Add async_is_safe_url() wrapping is_safe_url via asyncio.to_thread, and route
all async SSRF call sites through it: web_extract_tool, the vision/video
preflight checks, and both download redirect guards. socket.getaddrinfo blocks;
calling it inline from async tool paths froze the event loop for the duration of
DNS resolution.
vision_tools: split _validate_image_url into _image_url_shape_ok (no DNS) +
sync _validate_image_url (for sync callers/tests) + async _validate_image_url_async.
Widened beyond the original PR #3691 to sibling async sites that also blocked
the loop (second redirect guard, video preflight).
Salvage of #3691 by @Kewe63 — surgically re-applied onto current main because
the original branch was too stale to cherry-pick cleanly (would have reverted
the web_crawl_tool refactor).
Co-authored-by: Kewe63 <kewe.3217@gmail.com >
2026-06-04 18:04:47 -07:00
..
2026-06-04 17:54:59 -07:00
2026-05-18 10:14:38 -07:00
2026-06-05 10:18:10 +10:00
2026-06-03 23:51:44 -06:00
2026-06-04 05:40:13 -07:00
2026-06-04 03:03:35 -07:00
2026-05-28 22:26:25 -07:00
2026-03-14 14:27:20 +03:00
2026-06-02 12:37:40 -04:00
2026-06-04 16:54:40 -07:00
2026-06-04 17:52:50 -07:00
2026-05-17 23:28:45 -07:00
2026-06-02 17:00:04 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 17:40:33 -07:00
2026-06-04 07:52:04 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 06:16:45 -07:00
2026-05-14 22:27:09 -07:00
2026-06-03 15:11:57 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 18:04:47 -07:00
2026-06-04 10:07:20 -07:00
2026-06-01 19:52:28 -07:00
2025-10-01 23:29:25 +00:00
2026-06-01 19:51:03 -07:00
2026-03-17 02:53:33 -07:00
2026-04-21 01:56:35 -07:00
2026-04-28 04:58:22 -07:00
2026-04-21 06:06:16 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 21:43:59 -07:00
2026-04-29 23:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-06-03 07:32:00 +07:00
2026-06-04 03:03:35 -07:00
2026-06-01 16:06:44 +10:00
2026-06-01 13:32:55 +10:00
2026-05-28 22:26:25 -07:00
2026-05-25 15:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-30 04:32:06 -07:00
2026-05-28 22:26:25 -07:00
2026-06-03 19:37:29 -07:00
2026-05-02 01:49:55 -07:00
2026-05-31 17:46:56 -05:00
2026-05-28 21:40:39 -07:00
2026-05-27 14:31:55 -07:00
2026-06-04 10:07:20 -07:00
2026-05-29 22:29:48 -07:00
2026-05-27 10:49:33 -07:00
2026-06-01 20:13:42 -07:00
2026-05-14 09:05:31 -07:00
2026-05-06 04:02:02 -07:00
2026-05-27 13:55:51 -07:00
2026-04-28 06:45:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-07 13:04:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-04-20 12:23:05 -07:00
2026-04-19 22:44:47 -07:00
2026-05-28 22:26:25 -07:00
2026-03-24 08:19:23 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 18:04:47 -07:00
2026-06-03 06:36:46 -07:00
2026-05-28 22:26:25 -07:00
2026-05-16 12:15:45 -07:00
2026-06-03 12:00:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 08:54:38 -07:00
2026-04-08 00:41:36 -07:00
2026-05-21 16:40:04 +05:30
2026-05-16 00:57:39 -07:00
2026-03-19 15:16:35 +01:00
2026-05-28 22:26:25 -07:00
2026-05-07 13:04:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-07 05:46:05 -07:00
2026-06-03 06:36:46 -07:00
2026-06-04 16:56:34 -07:00
2026-03-30 13:28:10 +09:00
2026-06-03 12:00:27 -07:00
2026-05-28 22:26:25 -07:00
2026-04-26 18:50:49 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00