Skip to content

Fix code scanning alert no. 86: Client-side cross-site scripting#1769

Merged
mergify[bot] merged 1 commit intomainfrom
alert-autofix-86
Oct 20, 2024
Merged

Fix code scanning alert no. 86: Client-side cross-site scripting#1769
mergify[bot] merged 1 commit intomainfrom
alert-autofix-86

Conversation

@robfrank
Copy link
Copy Markdown
Collaborator

Fixes https://github.com/ArcadeData/arcadedb/security/code-scanning/86

To fix the cross-site scripting vulnerability, we need to ensure that any user-provided data is properly sanitized before being inserted into the HTML. The best way to fix this issue is to use a function that escapes HTML special characters, preventing the execution of any embedded scripts.

  • General Fix: Use a function to escape HTML special characters before inserting user-provided data into the HTML.
  • Detailed Fix: Modify the line that appends the option element to use a sanitized version of limitPar.
  • Files/Regions/Lines to Change: Modify line 372 in studio/src/main/resources/static/query.html.
  • Needed: Ensure the escapeHtml function is available and used correctly.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@robfrank robfrank requested a review from lvca October 19, 2024 15:34
@robfrank robfrank added the enhancement New feature or request label Oct 19, 2024
@robfrank robfrank added this to the 24.11.1 milestone Oct 19, 2024
@robfrank robfrank marked this pull request as ready for review October 19, 2024 15:48
@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b69eb48) 65144 0 0.00%
Head commit (74bbccd) 65144 (+0) 0 (+0) 0.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1769) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@mergify mergify bot merged commit d7192ba into main Oct 20, 2024
@robfrank robfrank deleted the alert-autofix-86 branch June 20, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants