Skip to content
Permalink
Browse files

Merge PR #3015: Do not include OS in HTTP user agent depending on pri…

…vacy setting
  • Loading branch information...
mkrautz committed Apr 14, 2017
2 parents eca5d03 + 710aa60 commit 4e430f745fbf012374fac854d9e6dffba118c43f
Showing with 11 additions and 5 deletions.
  1. +7 −1 src/mumble/NetworkConfig.cpp
  2. +4 −4 src/mumble/NetworkConfig.ui
@@ -158,5 +158,11 @@ QNetworkReply *Network::get(const QUrl &url) {

void Network::prepareRequest(QNetworkRequest &req) {
req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
req.setRawHeader(QString::fromLatin1("User-Agent").toUtf8(), QString::fromLatin1("Mozilla/5.0 (%1; %2) Mumble/%3 %4").arg(OSInfo::getOS(), OSInfo::getOSVersion(), QLatin1String(MUMTEXT(MUMBLE_VERSION_STRING)), QLatin1String(MUMBLE_RELEASE)).toUtf8());

// Do not send OS information if the corresponding privacy setting is enabled
if (g.s.bHideOS) {
req.setRawHeader(QString::fromLatin1("User-Agent").toUtf8(), QString::fromLatin1("Mozilla/5.0 Mumble/%1 %2").arg(QLatin1String(MUMTEXT(MUMBLE_VERSION_STRING)), QLatin1String(MUMBLE_RELEASE)).toUtf8());
} else {
req.setRawHeader(QString::fromLatin1("User-Agent").toUtf8(), QString::fromLatin1("Mozilla/5.0 (%1; %2) Mumble/%3 %4").arg(OSInfo::getOS(), OSInfo::getOSVersion(), QLatin1String(MUMTEXT(MUMBLE_VERSION_STRING)), QLatin1String(MUMBLE_RELEASE)).toUtf8());
}
}
@@ -304,14 +304,14 @@ Prevents the client from downloading images embedded into chat messages with the
<item>
<widget class="QCheckBox" name="qcbHideOS">
<property name="toolTip">
<string>Prevent OS information being sent to the server</string>
<string>Prevent OS information being sent to Mumble servers and web servers</string>
</property>
<property name="whatsThis">
<string>&lt;b&gt;Don't send OS information to the server&lt;/b&gt;&lt;br/&gt;
Prevents the client from sending potentially identifying information about the operating system to the server.</string>
<string>&lt;b&gt;Don't send OS information to servers&lt;/b&gt;&lt;br/&gt;
Prevents the client from sending potentially identifying information about the operating system to the Mumble server and web servers.</string>
</property>
<property name="text">
<string>Do not send OS information to Mumble servers</string>
<string>Do not send OS information to Mumble servers and web servers</string>
</property>
</widget>
</item>

0 comments on commit 4e430f7

Please sign in to comment.
You can’t perform that action at this time.