From 59b1b45625da0df1c5c14fdf22ffd2d8d48f394a Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Thu, 12 Aug 2021 22:18:47 +0200 Subject: [PATCH] Sentry: don't report id=authkey unless it's likely to be valid --- src/TSentry.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/TSentry.cpp b/src/TSentry.cpp index 2ea874b..0d34a40 100644 --- a/src/TSentry.cpp +++ b/src/TSentry.cpp @@ -37,7 +37,11 @@ void TSentry::SetupUser() { return; } sentry_value_t user = sentry_value_new_object(); - sentry_value_set_by_key(user, "id", sentry_value_new_string(Application::Settings.Key.c_str())); + if (Application::Settings.Key.size() == 36) { + sentry_value_set_by_key(user, "id", sentry_value_new_string(Application::Settings.Key.c_str())); + } else { + sentry_value_set_by_key(user, "id", sentry_value_new_string("unauthenticated")); + } sentry_set_user(user); }