Skip to content

Fix #1525: neutralise C0/C1 control characters in log messages - #1526

Open
inchang-ing wants to merge 1 commit into
Delgan:masterfrom
inchang-ing:fix-1525
Open

inchang-ing wants to merge 1 commit into
Delgan:masterfrom
inchang-ing:fix-1525

Conversation

@inchang-ing

Copy link
Copy Markdown

Fixes #1525.

Adds an opt-in sanitize argument to logger.add() that escapes C0, DEL and C1 control characters contained in the logged message before it is written to the sink, preventing terminal escape-sequence injection (screen clearing, window renaming, phishing links). The default behaviour is unchanged.

Add an opt-in 'sanitize' option to logger.add() which escapes C0, DEL and
C1 control characters contained in the logged message before it is written
to the sink. This prevents terminal escape-sequence injection (clearing the
screen, renaming the window, injecting phishing links) from untrusted
message content. The default behaviour is unchanged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Escape-sequence injection: log messages are written to the sink without neutralising C0/C1 control characters

1 participant