Skip to content

Commit 02625ef

Browse files
authored
ref(browser): Remove truncation when not needed (#18051)
Removes the remaining places where we truncate, although not needed. part of #17389
1 parent 6de4cba commit 02625ef

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/browser-utils/src/metrics/lcp.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ export function _sendStandaloneLcpSpan(
7777
entry.element && (attributes['lcp.element'] = htmlTreeAsString(entry.element));
7878
entry.id && (attributes['lcp.id'] = entry.id);
7979

80-
// Trim URL to the first 200 characters.
81-
entry.url && (attributes['lcp.url'] = entry.url.trim().slice(0, 200));
80+
entry.url && (attributes['lcp.url'] = entry.url);
8281

8382
// loadTime is the time of LCP that's related to receiving the LCP element response..
8483
entry.loadTime != null && (attributes['lcp.loadTime'] = entry.loadTime);

packages/browser/src/integrations/globalhandlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,5 @@ function getFilenameFromUrl(url: string | undefined): string | undefined {
217217
return `<data:${mimeType}${isBase64 ? ',base64' : ''}>`;
218218
}
219219

220-
return url.slice(0, 1024);
220+
return url; // it's fine to not truncate it as it's not put in a regex (https://codeql.github.com/codeql-query-help/javascript/js-polynomial-redos)
221221
}

0 commit comments

Comments
 (0)