Title: sentry/remix appears to be incorrectly identifying users based on IP address headers · Issue #7323 · getsentry/sentry-javascript · GitHub
Open Graph Title: sentry/remix appears to be incorrectly identifying users based on IP address headers · Issue #7323 · getsentry/sentry-javascript
X Title: sentry/remix appears to be incorrectly identifying users based on IP address headers · Issue #7323 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/7323
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sentry/remix appears to be incorrectly identifying users based on IP address headers","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. `bundle.tracing.min.js`) in your SDK setup.\n\n@sentry/remix\n\n### SDK Version\n\n7.38.0\n\n### Framework Version\n\nRemix 1.13.0\n\n### Link to Sentry event\n\nhttps://syncwith.sentry.io/issues/3955446273/events/fef107a39ec64e20ad358cf5f26396d1/?project=5880196\n\n### SDK Setup\n\nclient:\r\n\r\n```\r\n init({\r\n beforeSend,\r\n dsn: SENTRY_ADDON_DSN,\r\n tracesSampleRate: getApp() === 'syncwith' ? 1 : 0.05,\r\n sendDefaultPii: true,\r\n normalizeDepth: 6, // stringify deeper objects\r\n integrations: [\r\n new BrowserTracing({\r\n routingInstrumentation: remixRouterInstrumentation(\r\n useEffect,\r\n useLocation,\r\n useMatches\r\n ),\r\n }),\r\n ],\r\n });\r\n ```\r\n \r\n server:\r\n \r\n ```\r\n init({\r\n beforeSend,\r\n sendDefaultPii: true,\r\n dsn: SENTRY_ADDON_DSN,\r\n tracesSampleRate: getApp() === 'syncwith' ? 1 : 0.05,\r\n normalizeDepth: 6, // stringify deeper objects\r\n integrations: [\r\n // enable HTTP calls tracing\r\n new Integrations.Http({ tracing: true }),\r\n new Integrations.RequestData({\r\n include: {\r\n ip: true,\r\n },\r\n }),\r\n ],\r\n });\r\n ```\r\n \n\n### Steps to Reproduce\n\nWe're using a cloudflare worker in front of our website, and cloudflare cdn, and in this request:\r\n\r\nhttps://syncwith.sentry.io/issues/3955446273/events/fef107a39ec64e20ad358cf5f26396d1/?project=5880196\r\n\r\nIt appears that the user was identified using IP address `141.101.69.35`, which is a cloudflare IP. The correct IP to identify the user with is `2a01:cb19:8350:ed00:d0dd:fa5b:de31:8be5` found in header `Cf-Connecting-Ip`.\r\n\r\nI wonder if the bug is that sentry should let `Cf-Connecting-Ip` take precendence over `X-Forwarded-For`, or, if its not properly parsing `X-Forwarded-For` and extracting the relevant IP (the first, not the last, in this case)\r\n\r\n\u003cimg width=\"902\" alt=\"Screen Shot 2023-03-02 at 1 46 38 PM\" src=\"https://user-images.githubusercontent.com/148930/222564174-d4cdf9a0-9fb9-40da-8075-913a8eb356aa.png\">\r\n\u003cimg width=\"536\" alt=\"Screen Shot 2023-03-02 at 1 46 34 PM\" src=\"https://user-images.githubusercontent.com/148930/222564184-4743496d-0046-4e29-ac98-54b985741dba.png\">\r\n\u003cimg width=\"364\" alt=\"Screen Shot 2023-03-02 at 1 46 28 PM\" src=\"https://user-images.githubusercontent.com/148930/222564190-853fd5c4-6354-4e2a-8f52-9e674e4d9d7e.png\">\r\n\n\n### Expected Result\n\nThe user should be identified by the IP address found in cf-connecting-ip, or maybe first in x-forwarded-for\n\n### Actual Result\n\nThe user was identified by the wrong IP","author":{"url":"https://github.com/alexblack","@type":"Person","name":"alexblack"},"datePublished":"2023-03-02T21:47:27Z","url":"https://github.com/getsentry/sentry-javascript/issues/7323"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4fb3b3ea-d7b8-7c73-9075-e1f4c99b4332 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DEB8:3442E5:4D0FC2:68E087:6B04C316 |
| html-safe-nonce | e5d31365d811c3c6c5f92f0012b8ae6c842dfad0bac07eab67e063f6123fa9b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUI4OjM0NDJFNTo0RDBGQzI6NjhFMDg3OjZCMDRDMzE2IiwidmlzaXRvcl9pZCI6IjY2MDE0ODQ3ODQzNzgzNjQ2OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 059cda4c9dcbd8e5e35af7cca44837b2fb09541e07ba426fd89dfb7f15fbcc41 |
| hovercard-subject-tag | issue:1607555945 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/7323/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d2fdceee109e64c7ce153a90452fcebb845d725bddf1d589b4ef05080c8be1f3/getsentry/sentry-javascript/issues/7323 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d2fdceee109e64c7ce153a90452fcebb845d725bddf1d589b4ef05080c8be1f3/getsentry/sentry-javascript/issues/7323 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexblack |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width