Do not leak the local user in the device name.
Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
This commit is contained in:
parent
f183b5447b
commit
b279c52101
1 changed files with 1 additions and 7 deletions
|
@ -90,13 +90,7 @@ KdeConnectConfig::KdeConnectConfig()
|
|||
|
||||
QString KdeConnectConfig::name()
|
||||
{
|
||||
QString username;
|
||||
#ifdef Q_OS_WIN
|
||||
username = QString::fromLatin1(qgetenv("USERNAME"));
|
||||
#else
|
||||
username = QString::fromLatin1(qgetenv("USER"));
|
||||
#endif
|
||||
QString defaultName = username + QStringLiteral("@") + QHostInfo::localHostName();
|
||||
QString defaultName = QHostInfo::localHostName();
|
||||
QString name = d->m_config->value(QStringLiteral("name"), defaultName).toString();
|
||||
return name;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue