Should have a mechanism to disable log censoring of the USER/USERNAME environment variable #8505
Labels
Command Line
Issues that involve the command-line interface.
Engine
General game engine issues that do not fit in any other category.
Enhancement
Issues that are requests for new features or changes to existing ones.
Describe the desired feature
Wesnoth 1.18 forcefully censors every single log line via
lg::sanitize_log()
, resulting in any instances of the player'sUSER
(POSIX) orUSERNAME
(Windows) environment variable contents surrounded in/
or\
(*) being replaced with/USER/
or\USER\
. This can be rather unhelpful in situations where a dev is trying to gather diagnostic information, or when piping Wesnoth's output to another process, so ideally there should be a--no-log-sanitize
switch to disable this feature.As far as I can tell, the candidates for places to plug a check for this switch into are
lg::sanitize_log()
, orlg::log_in_progress::operator|()
around the call tosanitize_log()
, if there is a desire to otherwise preserve the latter's functionality for some other purpose despite the switch being in use.(*) Incidentally, this will not work in the event that the name is surrounded by a backslash and a forward slash, or viceversa — as in two different types of slash rather than two matching ones.
The text was updated successfully, but these errors were encountered: