feat(privacy): remove telemetry, analytics, fingerprinting

This commit is contained in:
admin 2025-12-17 18:41:03 -06:00
parent 25d0714cb4
commit b600beb3ea
6 changed files with 5 additions and 31 deletions

View file

@ -1,11 +1 @@
if (window.Radarr.analytics) {
const d = document;
const g = d.createElement('script');
const s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = '//piwik.sonarr.tv/piwik.js';
s.parentNode.insertBefore(g, s);
}
// Piwik analytics removed for privacy

View file

@ -92,7 +92,6 @@ export default function createSentryMiddleware() {
branch,
version,
release,
userHash,
isProduction
} = window.Radarr;
@ -107,7 +106,7 @@ export default function createSentryMiddleware() {
dsn,
environment: branch,
release,
sendDefaultPii: true,
sendDefaultPii: false,
beforeSend: cleanseData,
integrations: [
new Integrations.RewriteFrames({ iteratee: stripUrlBase }),
@ -116,7 +115,6 @@ export default function createSentryMiddleware() {
});
sentry.configureScope((scope) => {
scope.setUser({ username: userHash });
scope.setTag('version', version);
scope.setTag('production', isProduction);
});

View file

@ -30,8 +30,8 @@ public static string CalculateCrc(string input)
public static string AnonymousToken()
{
var seed = $"{Environment.ProcessorCount}_{Environment.OSVersion.Platform}_{Environment.MachineName}_{Environment.UserName}";
return HashUtil.CalculateCrc(seed);
// Machine fingerprinting removed for privacy - return non-identifying placeholder
return "anonymous";
}
}
}

View file

@ -232,7 +232,7 @@ public AuthenticationType AuthenticationMethod
? enumValue
: GetValueEnum("AuthenticationRequired", AuthenticationRequiredType.Enabled);
public bool AnalyticsEnabled => _logOptions.AnalyticsEnabled ?? GetValueBoolean("AnalyticsEnabled", true, persist: false);
public bool AnalyticsEnabled => _logOptions.AnalyticsEnabled ?? GetValueBoolean("AnalyticsEnabled", false, persist: true);
public string Branch => _updateOptions.Branch ?? GetValue("Branch", "master").ToLowerInvariant();

View file

@ -45,12 +45,6 @@ public UpdatePackage GetLatestUpdate(string branch, Version currentVersion)
.AddQueryParam("includeMajorVersion", true)
.SetSegment("branch", branch);
if (_analyticsService.IsEnabled)
{
// Send if the system is active so we know which versions to deprecate/ignore
request.AddQueryParam("active", _analyticsService.InstallIsActive.ToString().ToLower());
}
var update = _httpClient.Get<UpdatePackageAvailable>(request.Build()).Resource;
if (!update.Available)
@ -77,12 +71,6 @@ public List<UpdatePackage> GetRecentUpdates(string branch, Version currentVersio
request.AddQueryParam("prevVersion", previousVersion);
}
if (_analyticsService.IsEnabled)
{
// Send if the system is active so we know which versions to deprecate/ignore
request.AddQueryParam("active", _analyticsService.InstallIsActive.ToString().ToLower());
}
var updates = _httpClient.Get<List<UpdatePackage>>(request.Build());
return updates.Resource;

View file

@ -1,7 +1,6 @@
using System.Text;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NzbDrone.Common;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Analytics;
using NzbDrone.Core.Configuration;
@ -53,7 +52,6 @@ private string GetContent()
builder.AppendLine($" \"theme\": \"{_configFileProvider.Theme.ToString()}\",");
builder.AppendLine($" \"branch\": \"{_configFileProvider.Branch.ToLower()}\",");
builder.AppendLine($" \"analytics\": {_analyticsService.IsEnabled.ToString().ToLowerInvariant()},");
builder.AppendLine($" \"userHash\": \"{HashUtil.AnonymousToken()}\",");
builder.AppendLine($" \"urlBase\": \"{_urlBase}\",");
builder.AppendLine($" \"isProduction\": {RuntimeInfo.IsProduction.ToString().ToLowerInvariant()}");
builder.AppendLine("}");