Skip to content

mpa/client: escape terminal control chars in requester-supplied fields - #645

Open
sfc-gh-ikryvanos wants to merge 1 commit into
mainfrom
ikryvanos/mpa-sanitize-output
Open

mpa/client: escape terminal control chars in requester-supplied fields#645
sfc-gh-ikryvanos wants to merge 1 commit into
mainfrom
ikryvanos/mpa-sanitize-output

Conversation

@sfc-gh-ikryvanos

Copy link
Copy Markdown
Collaborator

The mpa list/get/approve commands print requester-controlled fields (method, user, justification, ids) to an approver's terminal. Embedded ANSI escape or carriage-return sequences could rewrite the terminal to hide or spoof what is actually being approved.

Add sanitizeForDisplay, which preserves tab and renders other C0/C1 control characters and DEL as \xNN, and apply it everywhere those fields are printed.

The mpa list/get/approve commands print requester-controlled fields (method,
user, justification, ids) to an approver's terminal. Embedded ANSI escape or
carriage-return sequences could rewrite the terminal to hide or spoof what is
actually being approved.

Add sanitizeForDisplay, which preserves tab and renders other C0/C1 control
characters and DEL as \xNN, and apply it everywhere those fields are printed.
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.

1 participant