Do not leak the local user in the device name.

Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
This commit is contained in:
Albert Vaca Cintora 2020-09-24 17:01:03 +02:00
parent 7b904f47b3
commit aa84aa5dcb

View file

@ -58,12 +58,7 @@ static QString getDefaultDeviceName() {
}
#endif
#ifdef Q_OS_WIN
QString username = QString::fromLatin1(qgetenv("USERNAME"));
#else
QString username = QString::fromLatin1(qgetenv("USER"));
#endif
return username + QStringLiteral("@") + QHostInfo::localHostName();
return QHostInfo::localHostName();
}