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

[Request] Remove full path from logs #85

Closed
Deterous opened this issue Oct 15, 2023 · 5 comments
Closed

[Request] Remove full path from logs #85

Deterous opened this issue Oct 15, 2023 · 5 comments

Comments

@Deterous
Copy link
Contributor

Deterous commented Oct 15, 2023

To remove sensitive information within Paths from redumper logs (when submitting to redump.org), such as a usernames, I suggest something like the following changes: main...Deterous:redumper:no-full-path

Although if you disagree with this change as default behaviour, then I at least request for a flag to enable this feature.
This is to support the feature of MPF using only relative paths: SabreTools/MPF#526

@tjanas
Copy link
Contributor

tjanas commented Oct 15, 2023

Not sure if this should be a change on the redumper side; if the redumper executable is launched from a relative working directory, sensitive information won’t be included in the relative path to the redumper executable.

As long as MPF sets the working directory appropriately when forking the redumper process (e.g. from the base MPF directory, calling “./Programs/Redumper/redumper.exe”) the paths in the redumper log will naturally be relative.

@Deterous
Copy link
Contributor Author

Okay, I will try do that and see if it works. Setting --image-path to a relative path did not remove the full path from the redumper logs completely, but that would.

@superg
Copy link
Owner

superg commented Oct 15, 2023

I will have to actually check it because in some spots I convert to absolute paths, forgot the reason why.

@superg
Copy link
Owner

superg commented Oct 24, 2023

--image-path is passed verbatim and is not changed, this is responsibility of a caller.

Overall there is only one such spot where it outputs an absolute filename:
command line: E:\ISO\redumper.exe --drive=X: --retries=100 --image-name=test

redumper never converts from relative to absolute but the issue here is that depending on what is launching the process, it might be passed as absolute by the shell.
In my testing, Windows PowerShell and Visual Studio always pass absolute executable path, CMD doesn't.

In any way, I stripped argv[0] alltogether and it became:
arguments: --drive=X: --retries=100 --image-name=test

I think this way it will be more concise and friendly.

@superg superg closed this as completed Oct 24, 2023
@Deterous
Copy link
Contributor Author

Thank you, this makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants