Potential fix for code scanning alert no. 17: Incomplete string escaping or encoding - #205
Potential fix for code scanning alert no. 17: Incomplete string escaping or encoding#205Dargon789 wants to merge 2 commits into
Conversation
…ing or encoding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReplaces a single-occurrence string replace with a global regex replace to correctly remove all '&' characters from ISP names when building chart labels, addressing an incomplete escaping/encoding issue without altering other behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Sorry @Dargon789, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Code Review
This pull request updates the ISP name formatting in the nodes-per-isp-chart component to replace all occurrences of the ampersand character using a global regular expression. The reviewer suggests adding a fallback or optional chaining to prevent potential runtime errors if the ISP name is null or undefined.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…hart.component.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Potential fix for https://github.com/Dargon789/mempool/security/code-scanning/17
Use a global replacement so all
&characters are handled consistently.Best minimal fix (no behavior change beyond correcting the bug): in
frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts, update line 144 from string-basedreplaceto regex-based global replace:isp[1].replace('&', '')isp[1].replace(/&/g, '')No new imports, methods, or dependencies are required.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Summary by Sourcery
Bug Fixes: