Closed DK318 closed 2 years ago
Field contents may contain ANSI control sequences and they can affect other fields.
Wrapped field value in newtype FieldValue and created the Buildable instance for it which appends reset ANSI control sequences char to field value.
FieldValue
Buildable
Tests
Documentation
Public contracts
I would compeletely disallow ANSI sequences in field values but this looks ok i guess, only danger is that an attacker can aribtrarily affect the user's terminal, but the code itself LGTM
Description
Problem
Field contents may contain ANSI control sequences and they can affect other fields.
Solution
Wrapped field value in newtype
FieldValue
and created theBuildable
instance for it which appends reset ANSI control sequences char to field value.Related issue(s)
:white_check_mark: Checklist for your Pull Request
Related changes (conditional)
Tests
Documentation
Public contracts
Stylistic guide (mandatory)