git-annex/Messages
Joey Hess 3290a09a70
filter out control characters in warning messages
Converted warning and similar to use StringContainingQuotedPath. Most
warnings are static strings, some do refer to filepaths that need to be
quoted, and others don't need quoting.

Note that, since quote filters out control characters of even
UnquotedString, this makes all warnings safe, even when an attacker
sneaks in a control character in some other way.

When json is being output, no quoting is done, since json gets its own
quoting.

This does, as a side effect, make warning messages in json output not
be indented. The indentation is only needed to offset warning messages
underneath the display of the file they apply to, so that's ok.

Sponsored-by: Brett Eisenberg on Patreon
2023-04-10 15:55:44 -04:00
..
Concurrent.hs generalize to allow running in Assistant monad 2020-12-04 13:07:30 -04:00
Internal.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
JSON.hs factor out Utility.Aeson.textKey 2022-03-02 18:24:06 -04:00
Progress.hs bwlimit 2021-09-21 16:58:10 -04:00
Serialized.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00