google-labs-jules[bot]
cb0fe93812
Security: Replace urllib.request with httpx in WebDAV testing
...
The `_test_webdav_connection` function previously used `urllib.request.urlopen`
to verify connection credentials. This triggers a Bandit B310 warning because
`urllib` supports multiple schemes (like file://, ftp://) and implicitly follows
redirects.
Although scheme checking and a basic `is_private_ip` validation were implemented,
using `urllib.request` remains risky because a public URL could return an
HTTP redirect to a private IP (e.g., 127.0.0.1) which `urllib` would blindly follow,
causing an SSRF (Server-Side Request Forgery) bypass.
This commit replaces `urllib.request` with `httpx.request` using explicitly
`follow_redirects=False`. This eliminates the B310 vulnerability, ensures
requests only hit the specified URL without following potentially malicious
redirects, and standardizes the application on `httpx` for safer HTTP connections.
In addition to fixing the vulnerability, test coverage is added for the
new WebDAV connections logic.
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-03-22 04:57:26 +00:00
..
2025-03-26 16:27:36 +00:00
2026-02-26 14:21:58 +00:00
2026-03-20 23:54:04 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-03-06 15:32:43 +00:00
2026-02-13 09:12:11 +00:00
2026-03-08 11:19:22 +00:00
2026-02-23 22:12:08 +00:00
2026-03-20 23:54:04 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-02-14 00:05:57 +00:00
2026-02-13 09:10:52 +00:00
2026-03-20 23:54:04 +00:00
2026-02-12 03:21:41 +00:00
2026-02-23 23:24:27 +00:00
2026-03-16 22:40:15 +00:00
2026-03-20 23:54:04 +00:00
2026-02-12 03:21:41 +00:00
2026-03-21 15:19:16 +00:00
2026-02-13 09:10:52 +00:00
2026-02-26 09:16:49 +00:00
2026-02-14 00:17:16 +00:00
2026-02-13 09:10:52 +00:00
2026-03-16 22:40:15 +00:00
2026-03-08 13:01:14 +00:00
2026-03-22 04:57:26 +00:00
2026-02-22 16:02:00 +00:00
2026-03-20 23:54:04 +00:00
2026-03-20 23:54:04 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-02-13 09:10:52 +00:00
2026-02-23 21:14:08 +00:00
2026-03-07 10:58:39 +00:00
2026-03-07 15:06:48 +00:00
2026-02-14 00:16:21 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-03-01 13:46:15 +00:00
2026-03-21 14:58:36 +00:00
2026-02-25 15:24:42 +00:00
2026-02-13 09:10:52 +00:00
2026-02-22 20:56:58 +00:00
2026-03-08 11:54:56 +00:00
2026-03-20 23:54:04 +00:00
2026-03-16 22:40:15 +00:00
2026-03-08 17:37:29 +00:00
2026-02-22 14:24:27 +00:00
2026-03-21 17:24:40 +00:00
2026-03-21 17:47:46 +00:00
2026-02-13 09:10:52 +00:00
2026-03-08 11:11:21 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:54:09 +00:00
2026-03-08 12:11:07 +00:00
2026-03-08 15:18:53 +00:00
2026-03-01 13:46:43 +00:00
2026-03-01 14:41:29 +00:00
2026-03-16 22:40:15 +00:00
2026-03-08 18:38:22 +00:00
2026-03-20 23:54:04 +00:00
2026-02-12 03:21:41 +00:00
2026-02-23 20:23:06 +00:00
2026-03-20 23:54:04 +00:00
2026-03-20 23:54:04 +00:00
2026-03-08 21:50:18 +00:00
2026-03-16 22:40:15 +00:00
2026-02-23 12:54:34 +00:00
2026-02-14 00:12:30 +00:00
2026-02-25 21:08:24 +00:00
2026-03-16 22:40:15 +00:00
2026-02-21 09:40:52 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-03-21 14:25:01 +00:00
2026-02-22 20:56:58 +00:00
2026-02-13 09:10:52 +00:00
2026-02-23 23:23:28 +00:00
2026-02-13 09:10:52 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-03-20 23:54:04 +00:00
2026-03-20 23:54:04 +00:00
2026-02-25 13:59:49 +00:00
2026-03-01 14:40:19 +00:00
2026-03-20 23:54:04 +00:00
2026-03-06 10:13:40 +00:00
2026-03-16 22:40:15 +00:00
2026-03-06 10:02:04 +00:00
2026-03-20 23:54:04 +00:00
2026-03-20 23:54:04 +00:00
2026-03-01 07:51:07 +00:00
2026-03-20 23:54:04 +00:00
2026-02-13 16:12:39 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-02-14 00:16:21 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-03-06 10:38:58 +00:00
2026-02-12 03:21:41 +00:00
2026-03-07 15:18:07 +00:00
2026-02-13 09:10:52 +00:00
2026-03-01 17:31:56 +00:00
2026-02-27 00:51:14 +00:00
2026-02-15 10:24:48 +00:00
2026-02-27 16:38:10 +00:00
2026-03-16 22:40:15 +00:00
2026-02-15 10:28:44 +00:00
2026-02-13 23:40:31 +00:00
2026-02-26 23:50:46 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-02-13 09:10:52 +00:00
2026-03-21 14:53:44 +00:00
2026-03-21 17:26:08 +00:00
2026-02-22 16:12:58 +00:00
2026-03-20 23:54:04 +00:00
2026-03-16 22:40:15 +00:00
2026-02-14 00:05:57 +00:00
2026-03-08 22:40:15 +00:00
2026-02-12 17:32:17 +00:00
2026-02-13 09:10:52 +00:00
2026-03-16 22:40:15 +00:00
2026-02-13 09:10:52 +00:00
2026-02-16 15:56:19 +00:00
2026-03-16 22:40:15 +00:00
2026-02-09 20:56:35 +00:00
2026-02-12 03:21:41 +00:00
2026-02-13 09:10:52 +00:00
2026-02-24 18:02:19 +00:00
2026-02-24 19:25:41 +01:00
2026-03-08 21:47:12 +00:00
2026-03-07 11:12:21 +00:00
2026-03-06 10:00:33 +00:00
2026-03-16 22:40:15 +00:00
2026-03-08 21:49:49 +00:00
2026-02-25 15:24:42 +00:00
2026-02-13 09:10:52 +00:00
2026-02-27 00:47:58 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-02-09 15:14:40 +00:00
2026-03-01 18:38:07 +00:00
2026-02-22 15:25:48 +00:00
2026-03-01 17:37:41 +00:00
2026-02-28 12:57:50 +00:00
2026-03-16 22:40:15 +00:00
2026-03-09 19:00:13 +00:00
2026-02-13 16:51:07 +00:00
2026-03-20 23:54:04 +00:00
2026-03-08 21:09:17 +00:00
2026-03-20 23:54:04 +00:00
2026-03-16 22:40:15 +00:00
2026-02-24 18:17:22 +00:00
2026-02-16 15:47:20 +00:00
2026-02-25 15:24:42 +00:00
2026-03-16 22:40:15 +00:00
2026-03-02 16:37:28 +00:00
2026-03-21 17:26:17 +00:00
2026-03-08 21:55:55 +00:00
2026-03-06 10:40:58 +00:00
2026-03-16 22:40:15 +00:00
2026-03-06 10:42:09 +00:00
2026-02-13 09:10:52 +00:00
2026-02-23 23:09:55 +00:00
2026-03-08 12:05:17 +00:00
2026-03-07 20:53:42 +00:00
2026-03-05 22:00:22 +00:00
2026-03-20 23:54:04 +00:00
2026-02-25 13:03:21 +00:00
2026-03-16 22:40:15 +00:00
2026-03-16 22:40:15 +00:00
2026-02-13 16:51:07 +00:00
2026-02-13 23:33:25 +00:00
2026-03-21 12:23:02 +00:00
2026-03-20 23:54:04 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-03-08 11:11:21 +00:00
2026-02-13 09:10:52 +00:00
2026-03-21 14:51:11 +00:00
2026-02-13 23:45:11 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-02-17 04:35:00 +00:00
2026-02-17 11:40:34 +00:00
2026-03-20 23:54:04 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 16:51:07 +00:00
2026-02-13 09:10:52 +00:00
2026-02-13 09:10:52 +00:00
2026-03-16 22:40:15 +00:00
2026-03-07 20:52:44 +00:00
2026-03-08 21:24:14 +00:00
2026-03-16 22:40:15 +00:00
2026-02-09 20:55:53 +00:00
2026-03-07 15:03:11 +00:00
2026-03-08 12:15:39 +00:00
2026-03-16 22:40:15 +00:00
2026-02-13 09:10:52 +00:00
2026-03-20 23:54:04 +00:00
2026-02-24 00:04:42 +00:00
2026-03-07 11:14:49 +00:00
2026-02-25 15:15:24 +00:00
2026-03-09 20:19:19 +00:00
2026-03-08 18:33:39 +00:00
2026-03-08 18:48:11 +00:00
2026-02-17 12:01:40 +00:00
2026-03-16 22:40:15 +00:00
2026-03-09 20:19:19 +00:00
2026-03-08 11:41:18 +00:00
2026-03-01 13:46:15 +00:00
2026-02-24 00:04:42 +00:00
2026-03-08 15:10:46 +00:00
2026-03-08 11:57:37 +00:00
2026-03-01 17:40:54 +00:00
2026-03-09 09:29:43 +00:00
2026-03-01 20:42:57 +00:00
2026-02-23 10:01:07 +00:00