Skip to content

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Oct 29, 2025

Removes the remaining places where we truncate, although not needed.

part of #17389

@s1gr1d s1gr1d requested a review from Lms24 October 29, 2025 09:27
@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.63 kB -0.03% -5 B 🔽
@sentry/browser - with treeshaking flags 23.12 kB -0.03% -5 B 🔽
@sentry/browser (incl. Tracing) 41.26 kB -0.01% -3 B 🔽
@sentry/browser (incl. Tracing, Profiling) 45.54 kB -0.01% -4 B 🔽
@sentry/browser (incl. Tracing, Replay) 79.5 kB -0.02% -13 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.19 kB -0.02% -10 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 84.19 kB -0.02% -13 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 96.36 kB -0.02% -12 B 🔽
@sentry/browser (incl. Feedback) 41.31 kB -0.02% -5 B 🔽
@sentry/browser (incl. sendFeedback) 29.3 kB -0.03% -7 B 🔽
@sentry/browser (incl. FeedbackAsync) 34.23 kB -0.02% -6 B 🔽
@sentry/react 26.32 kB -0.02% -5 B 🔽
@sentry/react (incl. Tracing) 43.24 kB -0.01% -1 B 🔽
@sentry/vue 29.12 kB -0.02% -5 B 🔽
@sentry/vue (incl. Tracing) 43.05 kB -0.01% -2 B 🔽
@sentry/svelte 24.64 kB -0.03% -5 B 🔽
CDN Bundle 26.89 kB -0.02% -5 B 🔽
CDN Bundle (incl. Tracing) 41.79 kB -0.01% -4 B 🔽
CDN Bundle (incl. Tracing, Replay) 78.07 kB -0.01% -2 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 83.56 kB -0.01% -3 B 🔽
CDN Bundle - uncompressed 78.88 kB -0.02% -14 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 123.97 kB -0.03% -34 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 239.17 kB -0.02% -34 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 251.93 kB -0.02% -34 B 🔽
@sentry/nextjs (client) 45.36 kB -0.01% -3 B 🔽
@sentry/sveltekit (client) 41.67 kB -0.01% -2 B 🔽
@sentry/node-core 50.81 kB - -
@sentry/node 157.88 kB - -
@sentry/node - without tracing 92.69 kB - -
@sentry/aws-serverless 106.42 kB - -

View base workflow run


// Trim URL to the first 200 characters.
entry.url && (attributes['lcp.url'] = entry.url.trim().slice(0, 200));
entry.url && (attributes['lcp.url'] = entry.url);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Data URL Truncation Risk in URL Handling

Removing the truncation of entry.url without handling data URLs could cause issues when the LCP element uses a data URL (e.g., data:image/png;base64,<very long base64 string>). Unlike globalhandlers.ts which has special handling for data URLs (lines 210-215), this code directly assigns the URL without any length protection. Data URLs with embedded base64 images can be extremely long (potentially megabytes), which could cause problems with attribute storage, transmission, or display in the Sentry UI.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants