Martin Atkins
ee8a0ece23
command/format: Filter C0 control characters in diagnostic output
...
A diagnostic message can potentially include substrings derived from data
fetched from untrusted sources, such as if a network request fails in a
way that causes part of the response data to be included verbatim in the
error message.
This new filtering ensures that if any such data is included then any
C0 control characters in the string cannot affect the state of a terminal
that stdout/stderr might be connected to, by replacing them with their
corresponding printable representations from Unicode's "Control Pictures"
block.
The filtering of source snippets and source filenames is not technically
necessary because those are under control of module authors only and
operators are already expected to review modules they use to ensure that
they can cause only desirable behavior, since modules are arbitrary code.
However, it's included here for defense-in-depth because there is little
reason for such characters to appear legitimately in either of those
contexts in practice.
Signed-off-by: Martin Atkins <mart@degeneration.co.uk >
2025-11-10 09:49:35 -08:00
..
2025-10-10 08:23:54 -07:00
2025-11-01 08:00:01 -03:00
2025-07-10 08:11:39 -07:00
2025-10-30 05:54:27 -04:00
2025-11-10 09:49:35 -08:00
2025-08-04 16:39:12 +03:00
2025-09-22 13:40:48 +01:00
2025-09-10 07:45:23 -04:00
2025-09-22 17:15:20 +03:00
2025-10-31 08:41:52 +02:00
2025-09-05 14:38:28 -03:00
2025-09-10 07:45:23 -04:00
2025-08-04 16:39:12 +03:00
2025-11-01 08:00:01 -03:00
2025-09-10 07:45:23 -04:00
2025-09-10 07:45:23 -04:00
2025-11-03 11:27:13 -08:00
2025-05-15 07:39:11 -04:00
2025-05-08 17:01:40 +03:00
2025-04-23 07:48:41 -04:00
2025-09-30 15:49:55 -03:00
2025-08-01 16:25:39 +03:00
2025-05-15 07:39:11 -04:00
2025-05-07 14:14:34 -07:00
2024-02-08 09:48:59 +00:00
2024-04-25 08:15:46 +02:00
2025-10-13 10:00:19 +03:00
2024-08-02 07:29:40 -04:00
2025-08-28 20:01:11 -03:00
2024-10-29 12:13:44 +02:00
2024-08-02 10:21:44 +01:00
2025-03-10 13:16:27 -04:00
2025-08-29 14:32:33 -03:00
2025-05-08 17:01:40 +03:00
2024-02-08 09:48:59 +00:00
2024-02-08 09:48:59 +00:00
2025-04-23 07:48:41 -04:00
2025-05-15 07:39:11 -04:00
2025-05-09 10:16:38 +01:00
2024-07-11 11:00:18 -04:00
2025-05-15 07:39:11 -04:00
2025-04-30 16:28:19 +01:00
2024-02-08 09:48:59 +00:00
2024-02-08 09:48:59 +00:00
2025-09-02 13:21:19 +04:00
2025-08-04 16:39:12 +03:00
2025-09-20 15:51:29 -03:00
2025-10-30 13:27:10 -07:00
2025-06-12 09:37:59 -07:00
2025-06-12 09:37:59 -07:00
2025-06-12 09:37:59 -07:00
2025-06-12 09:37:59 -07:00
2024-02-08 09:48:59 +00:00
2025-10-07 08:36:30 -04:00
2025-08-28 12:19:00 -03:00
2025-09-11 11:33:53 -07:00
2025-09-10 07:45:23 -04:00
2025-07-01 07:44:47 -07:00
2025-06-19 10:46:31 +01:00
2024-03-07 08:55:57 -05:00
2025-06-13 08:22:47 -07:00
2025-05-15 07:39:11 -04:00
2024-06-03 16:49:36 +03:00
2025-04-23 07:48:41 -04:00
2024-10-07 18:30:42 +01:00
2025-10-13 10:00:19 +03:00
2024-02-08 09:48:59 +00:00
2025-10-31 08:41:52 +02:00
2025-10-31 08:41:52 +02:00
2025-04-25 12:26:28 +03:00
2025-07-10 08:11:39 -07:00
2025-09-11 11:33:53 -07:00
2025-05-09 14:01:32 +03:00
2025-05-23 08:58:23 -07:00
2024-02-08 09:48:59 +00:00
2025-04-23 07:48:41 -04:00
2025-10-30 13:27:10 -07:00
2024-02-08 09:48:59 +00:00
2025-10-13 10:00:19 +03:00
2025-05-15 07:39:11 -04:00
2025-05-08 07:13:19 -07:00
2025-04-23 07:48:41 -04:00
2025-07-10 08:11:39 -07:00
2024-02-08 09:48:59 +00:00
2025-07-10 08:11:39 -07:00
2025-04-30 16:28:19 +01:00
2025-09-16 09:38:04 -03:00
2025-10-30 13:27:10 -07:00
2024-02-08 09:48:59 +00:00
2025-04-23 07:48:41 -04:00
2025-07-10 08:11:39 -07:00
2025-05-07 14:14:34 -07:00
2025-08-04 16:39:12 +03:00
2025-08-04 16:39:12 +03:00
2025-04-23 07:48:41 -04:00
2025-07-10 08:11:39 -07:00
2025-09-06 10:47:17 -03:00
2025-07-10 08:11:39 -07:00
2025-04-23 07:48:41 -04:00
2025-07-10 08:11:39 -07:00
2025-04-23 07:48:41 -04:00
2025-07-10 08:11:39 -07:00
2025-04-23 07:48:41 -04:00
2025-07-10 08:11:39 -07:00
2025-04-30 16:28:19 +01:00
2025-05-15 07:39:11 -04:00
2025-07-10 08:11:39 -07:00
2025-09-05 14:41:32 -04:00
2025-10-09 15:23:05 -07:00
2024-02-08 09:48:59 +00:00
2024-02-08 09:48:59 +00:00
2025-05-15 07:39:11 -04:00
2025-07-10 08:11:39 -07:00
2025-05-15 07:39:11 -04:00
2025-07-10 08:11:39 -07:00
2025-08-29 14:16:47 -03:00
2025-04-30 16:28:19 +01:00
2025-04-25 12:40:48 +01:00
2024-02-08 09:48:59 +00:00
2025-09-02 16:07:35 -03:00
2024-02-08 09:48:59 +00:00
2025-07-10 08:11:39 -07:00
2025-05-07 14:14:34 -07:00
2025-07-10 08:11:39 -07:00
2025-05-07 14:14:34 -07:00
2025-04-30 16:28:19 +01:00