fcy
6063d975e8
fix(http): restore ACP executable-path validation, bypass SSRF URL check ( #1481 )
...
ACP providers use api_base to store an executable command/path, not a URL.
A previous SSRF-hardening refactor incorrectly classified ACP as a local-URL
provider type, causing create/update to reject valid ACP configs with
"provider URL must use http or https scheme".
Changes:
- Remove ProviderACP from localURLProviderTypes.
- Add validateACPExecutablePath mirroring the runtime registration logic in
cmd/gateway_providers.go (allows empty, claude/codex/gemini, or absolute path;
rejects URLs and relative paths).
- Route ACP through the new validator inside validateProviderURL.
- Add unit tests for validateACPExecutablePath.
- Update existing local-type tests that assumed ACP was URL-based.
- Add create/update HTTP handler regression tests for ACP binary, empty binary,
and URL rejection.
Bug-first verification: without the fix, ACP api_base values like "gemini" or
absolute paths fail URL validation, while URLs are incorrectly accepted; with
the fix the behavior is reversed to match the intended executable-path model.
Fixes nextlevelbuilder/goclaw#1481 .
2026-09-27 12:42:14 +08:00
..
2026-05-22 20:59:47 +07:00
2026-05-22 20:59:47 +07:00
2026-03-27 10:19:16 +07:00
2026-03-27 10:19:16 +07:00
2026-04-09 21:15:19 +07:00
2026-04-24 00:16:14 +07:00
2026-09-21 17:28:58 +07:00
2026-04-09 21:15:19 +07:00
2026-05-31 12:44:29 +07:00
2026-05-17 15:51:56 +07:00
2026-03-29 18:01:08 +07:00
2026-04-09 21:15:19 +07:00
2026-06-12 10:40:59 +07:00
2026-06-12 10:40:59 +07:00
2026-05-17 15:51:56 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-10 19:35:02 +07:00
2026-04-10 19:35:02 +07:00
2026-04-09 21:15:19 +07:00
2026-03-14 18:13:52 +07:00
2026-07-03 08:25:05 +07:00
2026-07-09 02:23:46 +07:00
2026-04-17 19:02:53 +07:00
2026-03-29 18:01:08 +07:00
2026-09-21 17:28:58 +07:00
2026-05-22 20:59:47 +07:00
2026-04-12 10:24:07 +07:00
2026-03-23 08:08:23 +07:00
2026-04-12 10:24:07 +07:00
2026-05-20 22:17:13 +07:00
2026-03-23 08:08:23 +07:00
2026-04-11 21:22:23 +07:00
2026-09-18 12:12:23 +04:00
2026-06-26 22:55:17 +07:00
2026-04-13 21:01:21 +07:00
2026-04-13 21:01:21 +07:00
2026-07-07 19:54:37 +07:00
2026-07-07 19:54:37 +07:00
2026-05-24 11:27:02 +07:00
2026-05-24 11:27:02 +07:00
2026-05-24 11:27:02 +07:00
2026-04-11 23:22:17 +07:00
2026-05-21 16:44:43 +07:00
2026-09-26 10:33:07 +07:00
2026-07-03 08:25:05 +07:00
2026-05-31 13:50:31 +07:00
2026-05-31 13:50:31 +07:00
2026-05-31 13:50:31 +07:00
2026-05-31 13:50:31 +07:00
2026-07-10 22:25:45 +07:00
2026-07-10 22:25:45 +07:00
2026-05-22 20:59:47 +07:00
2026-07-08 20:53:19 +07:00
2026-08-15 23:48:15 +07:00
2026-07-08 20:53:19 +07:00
2026-08-06 22:32:00 +07:00
2026-04-24 00:16:14 +07:00
2026-04-24 00:16:14 +07:00
2026-03-29 23:51:53 +07:00
2026-03-27 09:28:42 +07:00
2026-04-09 21:15:19 +07:00
2026-04-10 10:13:58 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-28 13:33:25 +07:00
2026-05-17 15:33:55 +07:00
2026-06-05 00:48:38 +07:00
2026-06-05 00:48:38 +07:00
2026-05-22 21:53:10 +07:00
2026-05-22 21:53:10 +07:00
2026-05-24 11:13:03 +07:00
2026-05-24 11:13:03 +07:00
2026-05-22 20:59:47 +07:00
2026-03-29 18:01:08 +07:00
2026-03-14 18:13:52 +07:00
2026-04-16 17:19:50 +07:00
2026-08-08 10:12:58 +08:00
2026-08-08 10:12:58 +08:00
2026-03-14 18:13:52 +07:00
2026-08-01 01:59:55 +07:00
2026-06-21 22:27:44 +07:00
2026-08-01 01:59:55 +07:00
2026-06-21 22:27:44 +07:00
2026-06-21 22:27:44 +07:00
2026-07-07 12:23:11 +07:00
2026-08-01 01:59:55 +07:00
2026-03-29 12:54:12 +07:00
2026-03-23 22:57:26 +07:00
2026-05-20 22:17:13 +07:00
2026-05-20 22:17:13 +07:00
2026-03-27 09:35:57 +07:00
2026-03-27 10:19:16 +07:00
2026-07-05 12:56:13 +07:00
2026-07-05 12:56:13 +07:00
2026-09-26 03:33:33 +07:00
2026-03-23 22:57:26 +07:00
2026-04-09 21:15:19 +07:00
2026-04-23 19:16:12 +07:00
2026-04-16 15:09:48 +07:00
2026-05-11 14:58:19 +07:00
2026-05-11 15:41:27 +07:00
2026-05-11 15:41:27 +07:00
2026-05-11 14:58:19 +07:00
2026-07-10 22:25:45 +07:00
2026-03-30 21:36:09 +07:00
2026-03-30 21:36:09 +07:00
2026-07-10 06:55:30 +07:00
2026-09-26 03:33:33 +07:00
2026-09-26 03:33:33 +07:00
2026-09-26 03:33:33 +07:00
2026-07-09 04:54:15 +07:00
2026-07-09 04:54:15 +07:00
2026-03-25 14:50:43 +07:00
2026-07-09 04:54:15 +07:00
2026-04-24 00:16:14 +07:00
2026-04-24 00:16:14 +07:00
2026-04-03 15:44:39 +07:00
2026-05-21 16:37:19 +07:00
2026-09-27 12:42:14 +08:00
2026-09-27 12:42:14 +08:00
2026-09-27 12:42:14 +08:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-13 21:01:21 +07:00
2026-06-24 14:03:00 +07:00
2026-05-31 22:05:59 +07:00
2026-06-12 10:40:59 +07:00
2026-05-24 15:14:43 +07:00
2026-05-31 11:05:47 +07:00
2026-05-31 11:05:47 +07:00
2026-05-31 22:05:59 +07:00
2026-05-31 19:42:05 +07:00
2026-05-31 19:42:05 +07:00
2026-05-31 16:49:23 +07:00
2026-05-22 20:59:47 +07:00
2026-05-22 20:59:47 +07:00
2026-06-12 10:38:53 +07:00
2026-06-12 10:38:53 +07:00
2026-04-11 23:22:17 +07:00
2026-06-12 15:38:23 +07:00
2026-06-12 15:38:23 +07:00
2026-05-31 12:44:29 +07:00
2026-05-31 12:44:29 +07:00
2026-06-12 10:38:53 +07:00
2026-09-01 02:42:47 +07:00
2026-09-01 02:42:47 +07:00
2026-06-12 10:38:53 +07:00
2026-06-12 10:38:53 +07:00
2026-06-12 10:38:53 +07:00
2026-05-21 16:37:50 +07:00
2026-05-24 15:57:21 +07:00
2026-06-26 05:59:35 +07:00
2026-06-29 20:54:30 +07:00
2026-05-31 12:24:22 +07:00
2026-07-15 09:56:43 +07:00
2026-07-05 22:09:27 +07:00
2026-05-24 15:57:21 +07:00
2026-07-05 22:09:27 +07:00
2026-03-29 22:33:17 +07:00
2026-05-20 16:33:49 +07:00
2026-05-20 16:33:49 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-05-24 11:13:03 +07:00
2026-03-23 10:17:47 +07:00
2026-03-27 09:35:57 +07:00
2026-05-24 11:13:03 +07:00
2026-04-13 19:19:51 +07:00
2026-03-23 22:57:26 +07:00
2026-03-23 22:57:26 +07:00
2026-03-29 22:33:17 +07:00
2026-03-29 22:33:17 +07:00
2026-04-12 10:24:07 +07:00
2026-04-16 15:49:50 +07:00
2026-04-16 15:49:50 +07:00
2026-04-13 21:01:21 +07:00
2026-04-09 21:15:19 +07:00
2026-04-16 15:49:50 +07:00
2026-05-11 14:58:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-06-12 00:14:40 +07:00
2026-06-12 00:14:40 +07:00
2026-04-20 00:05:19 +07:00
2026-04-20 00:05:19 +07:00
2026-04-20 00:05:19 +07:00
2026-07-12 12:56:59 +07:00
2026-07-12 12:56:59 +07:00
2026-04-20 00:05:19 +07:00
2026-04-23 08:31:53 +07:00
2026-04-23 08:31:53 +07:00
2026-04-23 08:31:53 +07:00
2026-04-23 19:16:12 +07:00
2026-04-23 08:31:53 +07:00
2026-05-23 09:34:29 +07:00
2026-05-23 00:16:03 +07:00
2026-05-24 11:13:03 +07:00
2026-07-03 06:24:21 +07:00
2026-07-03 06:24:21 +07:00
2026-07-03 06:24:21 +07:00
2026-07-03 06:24:21 +07:00
2026-07-03 06:24:21 +07:00
2026-04-17 19:07:01 +07:00
2026-04-09 21:15:19 +07:00
2026-04-11 21:22:23 +07:00
2026-03-30 14:12:18 +07:00
2026-07-08 19:23:21 +07:00
2026-04-13 10:59:27 +07:00
2026-05-28 20:55:23 +07:00
2026-05-28 20:55:23 +07:00
2026-06-09 23:04:59 +07:00
2026-06-09 23:04:59 +07:00
2026-04-23 18:56:57 +07:00
2026-04-12 13:25:15 +07:00
2026-04-11 21:22:23 +07:00
2026-04-12 14:31:36 +07:00
2026-04-13 21:42:17 +07:00
2026-04-20 00:05:19 +07:00
2026-04-20 00:05:19 +07:00
2026-04-09 21:15:19 +07:00
2026-06-24 16:10:38 +07:00
2026-06-24 10:39:24 +07:00
2026-06-24 10:39:24 +07:00
2026-06-24 16:10:38 +07:00
2026-05-20 16:33:49 +07:00
2026-05-20 16:33:49 +07:00
2026-05-20 16:33:49 +07:00
2026-05-20 16:33:49 +07:00
2026-07-10 22:56:05 +07:00
2026-07-10 22:56:05 +07:00
2026-05-11 13:29:24 +07:00
2026-06-24 16:10:38 +07:00
2026-06-21 18:46:37 +07:00
2026-05-11 13:29:24 +07:00
2026-05-11 13:29:24 +07:00
2026-05-11 13:29:24 +07:00
2026-03-25 22:17:33 +07:00
2026-05-11 14:58:19 +07:00