Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should have a mechanism to disable log censoring of the USER/USERNAME environment variable #8505

Open
irydacea opened this issue Mar 5, 2024 · 0 comments
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.

Comments

@irydacea
Copy link
Member

irydacea commented Mar 5, 2024

Describe the desired feature

Wesnoth 1.18 forcefully censors every single log line via lg::sanitize_log(), resulting in any instances of the player's USER (POSIX) or USERNAME (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(), or lg::log_in_progress::operator|() around the call to sanitize_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.

@irydacea irydacea added the Enhancement Issues that are requests for new features or changes to existing ones. label Mar 5, 2024
@Wedge009 Wedge009 added Command Line Issues that involve the command-line interface. Engine General game engine issues that do not fit in any other category. labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants