summaryrefslogtreecommitdiff
blob: b374d001036c16a4e353872138ce6f4e0d8ece29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From b279c52101d3f7cc30a26086d58de0b5f1c547fa Mon Sep 17 00:00:00 2001
From: Albert Vaca Cintora <albertvaka@gmail.com>
Date: Thu, 24 Sep 2020 17:01:03 +0200
Subject: [PATCH 02/10] Do not leak the local user in the device name.

Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
---
 core/kdeconnectconfig.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/core/kdeconnectconfig.cpp b/core/kdeconnectconfig.cpp
index 91719303..a8dbcf5c 100644
--- a/core/kdeconnectconfig.cpp
+++ b/core/kdeconnectconfig.cpp
@@ -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;
 }
-- 
2.28.0