-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(browser): Remove truncation when not needed #18051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
size-limit report 📦
|
|
|
||
| // 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); |
There was a problem hiding this comment.
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.
Removes the remaining places where we truncate, although not needed.
part of #17389