]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/varlink.c
json: replace JSON_FORMAT_REFUSE_SENSITIVE with JSON_FORMAT_CENSOR_SENSITIVE
authorLennart Poettering <lennart@poettering.net>
Tue, 16 Jan 2024 10:55:54 +0000 (11:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Jan 2024 16:17:19 +0000 (17:17 +0100)
commit9912897170fb52c25a13b1dd5524f505e3d36cc6
treeb6d68bbaacce0ed4eb3cc70c80310799156f06d0
parentc609338b1d7f5c627f93cc57ae2967cfb675c53c
json: replace JSON_FORMAT_REFUSE_SENSITIVE with JSON_FORMAT_CENSOR_SENSITIVE

Previously, the flag would completely refuse formatting a JSON object if
any field of it was marked sensitive. With this change we'll simply
replace the subobject with the string "<sensitive data>", and show
everything else.

This is tremendously useful when debugging, since it means that we can
again trace varlink calls through the stack: we can show all the message
metadata and just suppress the actually sensitive parameters.

The ability to debug this matters, and we should not hide more
information that we can get away with, to keep things debuggable and
maintainable.
src/shared/json.c
src/shared/json.h
src/shared/varlink.c
src/test/test-json.c