Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🔒️ Disable Gravatar for self-hosted instances (#2462)
Luke Vella8189279d79b9
diff --git a/apps/web/src/utils/gravatar.ts b/apps/web/src/utils/gravatar.tsindex c636823db..63f0632ec 100644--- a/apps/web/src/utils/gravatar.ts+++ b/apps/web/src/utils/gravatar.ts@@ -1,12 +1,15 @@import { createHash } from "node:crypto";+import { isSelfHosted } from "@/utils/constants";/*** Builds a Gravatar URL for an email address. Returns `null` when no email is- * provided. `d=404` makes Gravatar respond with a 404 when no avatar exists so- * the client falls back to initials.+ * provided, or for self-hosted instances — which often must keep personal data+ * (email hashes, client IPs) within the EU, so we don't send anything to a+ * third party there. `d=404` makes Gravatar respond with a 404 when no avatar+ * exists so the client falls back to initials.*/export function getGravatarUrl(email?: string | null) {- if (!email) {+ if (!email || isSelfHosted) {return null;}