Text that comes from a repository (file paths in particular, which git allows to contain newlines and escape characters) is written unchanged to the activity log and, in the CLI's text modes, to the terminal:
a newline in such text starts a new line in the log, which reads as a separate entry (the Log window's "Errors only" view groups lines by their timestamp prefix);
escape sequences reach the terminal as-is.
The JSON output modes are not affected: the JSON encoder escapes these characters.
Scope
One helper that turns control characters, line and paragraph separators, and bidirectional-override characters into visible \uXXXX text.
FileActivityLog: the message is always one line; an exception's text keeps its lines, each one indented, so no line of it can look like the start of an entry.
CLI text output: repository names, error text, and path notes go through the helper.
Threat model updated.
Acceptance
Tests: a path with a newline and an escape character produces one log entry and visible escapes in CLI text output; ordinary text is unchanged. 100% line coverage holds; zero warnings; format clean.
## Problem
Text that comes from a repository (file paths in particular, which git allows to contain newlines and escape characters) is written unchanged to the activity log and, in the CLI's text modes, to the terminal:
- a newline in such text starts a new line in the log, which reads as a separate entry (the Log window's "Errors only" view groups lines by their timestamp prefix);
- escape sequences reach the terminal as-is.
The JSON output modes are not affected: the JSON encoder escapes these characters.
## Scope
- One helper that turns control characters, line and paragraph separators, and bidirectional-override characters into visible `\uXXXX` text.
- `FileActivityLog`: the message is always one line; an exception's text keeps its lines, each one indented, so no line of it can look like the start of an entry.
- CLI text output: repository names, error text, and path notes go through the helper.
- Threat model updated.
## Acceptance
Tests: a path with a newline and an escape character produces one log entry and visible escapes in CLI text output; ordinary text is unchanged. 100% line coverage holds; zero warnings; format clean.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Text that comes from a repository (file paths in particular, which git allows to contain newlines and escape characters) is written unchanged to the activity log and, in the CLI's text modes, to the terminal:
The JSON output modes are not affected: the JSON encoder escapes these characters.
Scope
\uXXXXtext.FileActivityLog: the message is always one line; an exception's text keeps its lines, each one indented, so no line of it can look like the start of an entry.Acceptance
Tests: a path with a newline and an escape character produces one log entry and visible escapes in CLI text output; ordinary text is unchanged. 100% line coverage holds; zero warnings; format clean.