-
Notifications
You must be signed in to change notification settings - Fork 735
HTML report: max url lenght now will be find after ecoding #24533
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
Changes from all commits
53d25fc
dd45722
09f775c
dbb22ab
518b0f4
7ae223d
64c201f
6b9aa25
2a19d74
ff5e871
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -491,11 +491,33 @@ | |||||||||||||||||
|
|
||||||||||||||||||
| // Configuration constants | ||||||||||||||||||
| const MAX_URL_LENGTH = 8000; // GitHub URL limit is 8201, stay under 8000 to be safe | ||||||||||||||||||
| const LOG_ENTRY_ESTIMATE = 150; // Estimated characters per log entry | ||||||||||||||||||
| const MIN_REMAINING_SPACE = 100; // Minimum space needed for log section | ||||||||||||||||||
| const ERROR_BUFFER_SPACE = 50; // Buffer space when adding error details | ||||||||||||||||||
| const GITHUB_ISSUE_BASE_URL = "https://github.com/ydb-platform/ydb/issues/new"; // Base URL for GitHub issues | ||||||||||||||||||
|
|
||||||||||||||||||
| // Utility functions | ||||||||||||||||||
| function buildGitHubIssueUrl(title, body, labels) { | ||||||||||||||||||
| return GITHUB_ISSUE_BASE_URL + "?title=" + title + "&body=" + body + "&labels=" + labels + "&type=Bug"; | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| // Show tooltip stub to avoid runtime errors (visual feedback provided by icon swap) | ||||||||||||||||||
| function showCopiedTooltip() {} | ||||||||||||||||||
|
|
||||||||||||||||||
| // Safe percent-encoded truncation helpers | ||||||||||||||||||
| function isDecodable(s) { | ||||||||||||||||||
|
||||||||||||||||||
| function isDecodable(s) { | |
| function isDecodable(s) { | |
| if (typeof s !== 'string') return false; |
Copilot
AI
Sep 15, 2025
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.
This while loop could potentially run for a long time with malformed input. Consider adding a maximum iteration limit to prevent infinite loops.
| while (cut && !isDecodable(cut)) { | |
| if (/%[0-9A-Fa-f]{2}$/.test(cut)) cut = cut.slice(0, -3); | |
| else cut = cut.slice(0, -1); | |
| let maxIterations = 1000, iter = 0; | |
| while (cut && !isDecodable(cut) && iter < maxIterations) { | |
| if (/%[0-9A-Fa-f]{2}$/.test(cut)) cut = cut.slice(0, -3); | |
| else cut = cut.slice(0, -1); | |
| iter++; |
Uh oh!
There was an error while loading. Please reload this page.