lucko / spark

A performance profiler for Minecraft clients, servers, and proxies.
https://spark.lucko.me/
GNU General Public License v3.0
1.05k stars 144 forks source link

Username not omitted from JVM flags exposing Linux home folder prior to uploading. #423

Closed Ampflower closed 4 months ago

Ampflower commented 4 months ago

Description

The home folder is exposed in the resulting dump when viewing the JVM flags on spark.lucko.me, exposing the username in the process.

Reproduction Steps

Expected Behaviour

For any usernames to not be shown, i.e. for example, you'd get -Xms512m -Xmx4096m -Duser.language=en -Djava.library.path=$HOME/.local/share/PrismLauncher/instances/1.21/natives for JVM flags.

Platform Information

Spark Version

v1.10.73

Logs and Configs

No response

Extra Details

I am using Linux, but with a quick test, it appears that C:\Users\Username and /Users/Username for Windows and MacOS aren't properly omitted/replaced as well. I don't have easy access to either to know if it would still not be omitted properly otherwise.

It'd be best for it to be omitted before ever uploading, although the backend should ideally also scrub for older Spark clients, not allowing any download to have the exposed path.