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

Error message uses absolute path #3777

Closed
sevu opened this issue Dec 14, 2018 · 6 comments
Closed

Error message uses absolute path #3777

sevu opened this issue Dec 14, 2018 · 6 comments
Labels
Bug Issues involving unexpected behavior. Engine General game engine issues that do not fit in any other category. Low Priority Issues that will cause no meaningful problems if left unaddressed.

Comments

@sevu
Copy link
Member

sevu commented Dec 14, 2018

This line prints the absolute path. Usually error messages don't do that.

ERR_AUDIO << "tried to add duplicate track '" << track.file_path() << "'" << std::endl;

What does track.file_path() need to be replaced with?

@sevu sevu added Bug Issues involving unexpected behavior. Low Priority Issues that will cause no meaningful problems if left unaddressed. labels Dec 14, 2018
@alan-llin
Copy link

I believe it was intentional that they used track.file_path() for easier debugging. otherwise they would probably use track.id().

@CelticMinstrel
Copy link
Member

Error messages really shouldn't ever print an absolute path since it could leak the user's login name.

@ProditorMagnus
Copy link
Contributor

Some more

20181231 17:17:15 error config: error reading usermade add-on 'C:\Users\Ravana\Documents\My Games\Wesnoth1.14/data/add-ons/Ageless_Era/_main.cfg'
20181231 13:12:44 error filesystem: Not opening 'C:\Users\Ravana\Documents\My Games\Wesnoth1.14/data/add-ons/Ageless_Resources/general/images/attacks/sunburst.png' due to case mismatch.

@jostephd
Copy link
Member

I don't understand why this is a problem. Errors should usually be verbose to make debugging easier, and they aren't sent to wesnothd or anything, only to the log file, so who exactly are we censoring them from?

@ProditorMagnus
Copy link
Contributor

I believe it is in case some people use their real name as username.

@CelticMinstrel
Copy link
Member

People paste log messages in error reports. Some people don't take care to ensure their username isn't in the log. Some people might not care, but we shouldn't create opportunities for people to accidentally include their username (which could be their real name) in a report.

For WML files, the WML-visible path (ie, relative to the data folder or the addons folder) is entirely sufficient to track down the offending file, so there's no need to give any more info than that. For assets (which includes translations), it's a bit more tricky since they're drawn from all over the place; you'd probably need to do some sort of sanitization similar to what I did in the report command-line option (the option that prints out all the versions of dependent libraries and stuff).

@Wedge009 Wedge009 added the Engine General game engine issues that do not fit in any other category. label Oct 22, 2019
mattsc added a commit to mattsc/wesnoth that referenced this issue Jun 30, 2022
mattsc added a commit to mattsc/wesnoth that referenced this issue Jun 30, 2022
@mattsc mattsc mentioned this issue Jun 30, 2022
@mattsc mattsc closed this as completed in 4c0c21c Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. Engine General game engine issues that do not fit in any other category. Low Priority Issues that will cause no meaningful problems if left unaddressed.
Projects
None yet
Development

No branches or pull requests

6 participants