fix: render actual newline in terminal-sanitized error messages
sanitize_for_terminal() escaped every control char it saw, including plain LF, so any multi-line diagnostic built from a hardcoded template (e.g. the path-separator error in main.rs) came out on a TTY as the literal 4-character sequence "\x0A" instead of a line break. LF cannot draw, move the cursor, or exfiltrate data the way ESC- and CSI/OSC-initiated sequences can, so it does not need the same defense as those. CR is still escaped since it can overwrite the current line and forge fake output. Closes #2104
This commit is contained in:
1 parent
b6fe117b17
commit
8157be1243
2 files changed
+29
-6
No files matched your search
+2
-1
@@ -4,7 +4,8 @@
|
||||
-
|
||||
|
||||
## Bugfixes
|
||||
-
|
||||
- Render actual newlines instead of the literal `\x0A` escape in multi-line error
|
||||
messages printed to a terminal, see #2104
|
||||
|
||||
# 10.5.0
|
||||
|
||||
|
||||
Reference in new issue
Block a user