PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.39k stars 1.28k forks source link

Toolbar can load data from wrong environment #19234

Open corywatilo opened 10 months ago

corywatilo commented 10 months ago

Bug description

When running multiple projects, if you visit a site authorized in the toolbar while signed into a different project, it will inadvertently load the data for the currently authenticated project even though the hostname doesn't match an authorized hostname.

The flags below are for the PostHog environment but the toolbar authorized on a domain that isn't connected to the PostHog env (but that uses a shared login between the two).

image

How to reproduce

  1. In PostHog, open a project ("Project A") in PostHog and open an authorized URL via toolbar
  2. Go back to PostHog and open another project ("Project B")
  3. Visit the URL where the toolbar is open and refresh. If you look at feature flags, you'll see flags from Project B instead of Project A
pauldambra commented 1 month ago

+1 posthoghelp.zendesk.com/agent/tickets/17636