Sentry: don't report id=authkey unless it's likely to be valid

This commit is contained in:
Lion Kortlepel
2021-08-12 22:18:47 +02:00
committed by Lion
parent 15e5cee166
commit 59b1b45625

View File

@@ -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);
}