diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2022-09-20 13:59:47 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-09-26 10:00:25 -0400 |
commit | 25f9c58daca5a7c3884ca0f8b389f68fff54263a (patch) | |
tree | fc7bf7e15115c80816086fcc31410efaa028089a /.cirrus.yml | |
parent | ff17d6486f349dcdc115e898cc50c3845578aef3 (diff) | |
download | sos-25f9c58daca5a7c3884ca0f8b389f68fff54263a.tar.gz |
[clean,username_parser] Handle usernames with domain prefixes
In some configurations, we can expect usernames to be written as
`DOMAIN\user`, as well as the plain `user` form. Previously, the
domain-prefixed format would throw an exception in our obfuscation if
the letter after the `\` would cause the interpreter to regard that as a
special character.
Fix this by escaping the values passed to `get_regex_result()` so that
we can successfully compile a regex pattern object for domain-prefixed
usernames as well.
Further, when we encounter one of these usernames, the username parser
should automatically add an entry for the non-prefixed username as well.
While this will result in a secondary obfuscation match (due to the
current design of `sos clean`), this is preferable to potentially
leaving non-prefixed usernames in plaintext, if they happen to appear in
logs but not in any of our sourced files.
Related: RHBZ#2127977
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to '.cirrus.yml')
0 files changed, 0 insertions, 0 deletions