fish-shell/src/tests
Johannes Altmanninger e01fc62d69 Don't leak encoding of invalid codepoints into uvar file
When we read bytes like \xfc that don't produce a Unicode code point,
we encode them in a Unicode private use area.
This encoding should be transparent to the user.

We accidentally add it to uvar files as \uf6fc in this case.  When reading
it back, read_unquoted_escape() will fail at the "fish_reserved_codepoint(c)"
check. This check is to avoid external input being misinterpreted
as one of our in-band signalling characters like ANY_CHAR (for *).

For encoded raw bytes, this check probably doesn't really matter in terms of
security because the only thing we do with these bytes is convert them back
to raw. So we could allow unescaping them at this point, thus supporting
old uvar files.

However that seems like the wrong direction. PUA encoding should never leak.
So let's instead make sure to serialize it as \xfc instead of \f6fc going
forward.

Fixes #10313
2024-04-14 07:59:42 +02:00
..
abbrs.rs abbr: expand command abbrs after decorators (#10396) 2024-03-27 17:17:55 +01:00
common.rs tests: Pass correct length for buffer 2024-04-03 20:15:17 +02:00
complete.rs Insert some completions with quotes instead of backslashes 2024-04-13 15:34:21 +02:00
debounce.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
editable_line.rs
encoding.rs
env_universal_common.rs Don't leak encoding of invalid codepoints into uvar file 2024-04-14 07:59:42 +02:00
env.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
expand.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
fd_monitor.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
highlight.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
history.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
input_common.rs Extended & human-friendly keys 2024-04-02 14:35:16 +02:00
input.rs Display raw escape sequences the old way again 2024-04-09 00:07:27 +02:00
key.rs Allow abbreviating ctrl-/alt- as c-/a- 2024-04-12 11:27:55 +02:00
mod.rs Extended & human-friendly keys 2024-04-02 14:35:16 +02:00
pager.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
parse_util.rs Fix regression in parse_util_process_extent 2024-03-24 16:34:36 +01:00
parser.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
reader.rs
redirection.rs
screen.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
std.rs Fix formatting of new test 2024-03-09 22:06:33 -06:00
string_escape.rs Reduce some numbers to make cargo test run faster 2024-02-02 16:44:36 +01:00
termsize.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
threads.rs
tokenizer.rs
topic_monitor.rs Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
wgetopt.rs