alfadb
d78478e866
fix(gateway): sanitize stream errors to avoid leaking infrastructure topology
...
(*net.OpError).Error() concatenates Source/Addr fields, so the previous
disconnectMsg surfaced internal source IP/port and upstream server address
to clients via SSE error frames and UpstreamFailoverError.ResponseBody
(reported by @Wei-Shaw on PR #2066 ).
- Add sanitizeStreamError that maps known errors (io.ErrUnexpectedEOF,
context.Canceled, syscall.ECONNRESET/EPIPE/ETIMEDOUT/...) to fixed
descriptions and falls back to a generic placeholder, with an explicit
*net.OpError branch that drops Source/Addr fields entirely.
- Use sanitized message in client-facing disconnectMsg; full ev.err is
still preserved in the existing operator log line for diagnosis.
- Tests cover net.OpError redaction, the failover ResponseBody path, and
every known sanitized error mapping.
2026-04-29 15:44:54 +08:00
..
2026-04-25 14:52:58 +08:00
2026-04-19 18:45:04 +08:00
2026-04-23 21:40:58 +08:00
2026-04-23 21:40:58 +08:00
2026-04-14 16:26:46 +08:00
2026-04-14 16:26:46 +08:00
2026-04-25 14:52:58 +08:00
2026-04-23 12:44:44 +08:00
2026-04-25 16:56:50 +08:00
2026-04-25 20:37:42 +08:00
2026-04-15 15:29:52 +08:00
2026-04-25 05:26:33 +00:00
2026-04-14 09:32:11 +08:00
2026-04-25 14:52:58 +08:00
2026-04-22 00:54:38 +08:00
2026-04-22 13:19:28 +08:00
2026-04-23 21:40:58 +08:00
2026-04-14 09:15:49 +08:00
2026-04-22 00:54:38 +08:00
2026-04-22 00:54:38 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-09 18:14:28 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-25 20:22:07 +08:00
2026-04-26 12:42:35 +08:00
2026-04-21 09:53:15 -07:00
2026-04-21 09:53:15 -07:00
2026-04-21 09:53:15 -07:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-22 14:57:47 +08:00
2026-04-25 08:44:18 +08:00
2026-04-26 12:42:35 +08:00
2026-04-21 09:53:15 -07:00
2026-04-22 14:56:56 +08:00
2026-04-22 14:56:56 +08:00
2026-04-25 08:44:18 +08:00
2026-04-25 08:44:18 +08:00
2026-04-26 12:42:35 +08:00
2026-04-25 08:44:18 +08:00
2026-04-26 12:42:35 +08:00
2026-04-14 09:36:40 +08:00
2026-04-14 09:36:26 +08:00
2026-04-14 09:31:45 +08:00
2026-04-14 09:35:20 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-17 22:06:32 +08:00
2026-04-17 22:06:32 +08:00
2026-04-20 22:01:41 +08:00
2026-04-17 22:06:32 +08:00
2026-04-23 17:28:01 +08:00
2026-04-23 00:45:10 +08:00
2026-04-23 00:45:10 +08:00
2026-04-20 23:38:59 +08:00
2026-04-20 20:21:02 +08:00
2026-04-21 14:14:49 +08:00
2026-04-21 14:14:49 +08:00
2026-04-22 19:17:08 +08:00
2026-04-22 20:08:31 +08:00
2026-04-22 20:08:31 +08:00
2026-04-22 19:17:08 +08:00
2026-04-20 20:21:02 +08:00
2026-04-21 14:39:19 +08:00
2026-04-21 14:39:19 +08:00
2026-04-21 14:14:49 +08:00
2026-04-20 20:21:02 +08:00
2026-04-23 00:45:10 +08:00
2026-04-23 00:45:10 +08:00
2026-04-23 00:45:10 +08:00
2026-04-14 09:20:39 +08:00
2026-04-23 00:45:10 +08:00
2026-04-23 21:40:58 +08:00
2026-04-14 17:35:27 +08:00
2026-04-28 11:15:09 +08:00
2026-04-14 10:18:39 +08:00
2026-04-23 21:40:58 +08:00
2026-04-23 21:40:58 +08:00
2026-04-24 23:16:32 +08:00
2026-04-24 23:16:32 +08:00
2026-04-08 16:11:19 +08:00
2026-04-08 16:23:02 +08:00
2026-04-24 23:16:32 +08:00
2026-04-24 23:16:32 +08:00
2026-04-24 23:16:32 +08:00
2026-04-23 21:40:58 +08:00
2026-04-24 23:16:32 +08:00
2026-04-23 21:40:58 +08:00
2026-04-25 22:50:35 +08:00
2026-04-14 09:23:02 +08:00
2026-04-19 18:05:25 +08:00
2026-04-19 18:05:25 +08:00
2026-04-17 22:06:32 +08:00
2026-04-29 15:44:54 +08:00
2026-04-29 15:44:54 +08:00
2026-04-24 23:16:32 +08:00
2026-04-24 23:16:32 +08:00
2026-04-14 09:36:40 +08:00
2026-04-14 17:35:27 +08:00
2026-04-16 01:53:22 +08:00
2026-04-23 21:40:58 +08:00
2026-04-23 16:34:37 +08:00
2026-04-24 23:16:32 +08:00
2026-04-23 00:45:10 +08:00
2026-04-22 12:30:08 +08:00
2026-04-14 09:36:40 +08:00
2026-04-14 09:35:20 +08:00
2026-04-23 12:58:13 +08:00
2026-04-25 14:52:58 +08:00
2026-04-25 14:52:58 +08:00
2026-04-25 14:52:58 +08:00
2026-04-25 14:52:58 +08:00
2026-04-09 12:29:49 +08:00
2026-04-24 13:24:21 +00:00
2026-04-24 13:24:21 +00:00
2026-04-25 14:52:58 +08:00
2026-04-25 14:52:58 +08:00
2026-04-25 14:52:58 +08:00
2026-04-09 12:29:49 +08:00
2026-04-20 22:01:41 +08:00
2026-04-11 22:48:45 +08:00
2026-04-28 11:15:09 +08:00
2026-04-28 11:15:09 +08:00
2026-04-23 12:58:13 +08:00
2026-04-28 11:15:09 +08:00
2026-04-28 11:15:09 +08:00
2026-04-28 11:15:09 +08:00
2026-04-28 11:15:09 +08:00
2026-04-26 17:09:41 +00:00
2026-04-28 11:15:09 +08:00
2026-04-23 16:30:43 +08:00
2026-04-23 21:40:58 +08:00
2026-04-23 21:40:58 +08:00
2026-04-09 12:29:28 +08:00
2026-04-09 12:29:28 +08:00
2026-04-25 14:52:58 +08:00
2026-04-25 14:52:58 +08:00
2026-04-25 05:26:33 +00:00
2026-04-24 19:31:49 +08:00
2026-04-24 19:31:49 +08:00
2026-04-25 14:52:58 +08:00
2026-04-14 20:13:59 +08:00
2026-04-28 11:15:09 +08:00
2026-04-28 11:15:09 +08:00
2026-04-15 15:29:52 +08:00
2026-04-28 11:15:09 +08:00
2026-04-21 10:10:56 +08:00
2026-04-14 17:35:27 +08:00
2026-04-14 17:35:27 +08:00
2026-04-22 12:30:08 +08:00
2026-04-09 17:49:02 +08:00
2026-04-14 17:35:27 +08:00
2026-04-15 01:27:24 +08:00
2026-04-22 13:18:10 +08:00
2026-04-22 13:18:10 +08:00
2026-04-14 09:36:26 +08:00
2026-04-14 17:35:27 +08:00
2026-04-22 14:57:16 +08:00
2026-04-22 14:57:16 +08:00
2026-04-21 23:20:37 +08:00
2026-04-21 23:20:37 +08:00
2026-04-23 19:22:43 +08:00
2026-04-22 10:26:22 +08:00
2026-04-26 12:42:35 +08:00
2026-04-11 13:16:35 +08:00
2026-04-22 11:28:58 +08:00
2026-04-22 18:01:51 +08:00
2026-04-22 18:01:51 +08:00
2026-04-21 13:35:54 +08:00
2026-04-21 13:35:54 +08:00
2026-04-22 12:30:17 +08:00
2026-04-22 11:17:23 +08:00
2026-04-21 13:35:54 +08:00
2026-04-21 13:35:54 +08:00
2026-04-22 12:30:17 +08:00
2026-04-22 12:30:17 +08:00
2026-04-22 14:57:16 +08:00
2026-04-22 12:30:17 +08:00
2026-04-25 08:44:18 +08:00
2026-04-11 13:16:35 +08:00
2026-04-22 16:38:36 +08:00
2026-04-22 02:32:53 +08:00
2026-04-21 12:50:55 +08:00
2026-04-23 21:40:58 +08:00
2026-04-23 21:40:58 +08:00
2026-04-23 12:58:13 +08:00
2026-04-23 12:58:13 +08:00
2026-04-23 12:58:13 +08:00
2026-04-24 11:32:41 +08:00
2026-04-23 21:40:58 +08:00
2026-04-08 10:39:15 -07:00
2026-04-16 20:41:40 +08:00
2026-04-21 20:36:10 +08:00
2026-04-22 16:51:23 +08:00
2026-04-22 12:30:07 +08:00
2026-04-21 00:05:17 +08:00
2026-04-22 13:18:10 +08:00
2026-04-28 11:15:09 +08:00
2026-04-28 11:15:09 +08:00
2026-04-21 10:13:28 -07:00
2026-04-23 21:40:58 +08:00
2026-04-20 19:53:22 +08:00
2026-04-16 01:53:22 +08:00
2026-04-17 22:07:15 +08:00
2026-04-14 09:36:26 +08:00
2026-04-14 09:22:12 +08:00
2026-04-23 16:34:37 +08:00
2026-04-23 16:34:37 +08:00
2026-04-21 01:00:59 +08:00
2026-04-22 14:57:47 +08:00
2026-04-22 19:11:51 +08:00
2026-04-23 16:34:37 +08:00
2026-04-14 09:36:40 +08:00
2026-04-14 17:35:27 +08:00
2026-04-25 08:44:18 +08:00