Skip to content

Fix scanning issues#7623

Open
javiereguiluz wants to merge 1 commit into
EasyCorp:4.xfrom
javiereguiluz:fix_scanning_issues
Open

Fix scanning issues#7623
javiereguiluz wants to merge 1 commit into
EasyCorp:4.xfrom
javiereguiluz:fix_scanning_issues

Conversation

@javiereguiluz
Copy link
Copy Markdown
Collaborator

This fixes three client-side security issues flagged by GitHub code scanning:

1. Unvalidated URLs used for navigation/fetch (app.js) — the filter button (data-href) and action links (data-ea-action-url) read a URL from the DOM and used it (href/window.location/fetch) without validation, allowing a javascript: scheme to execute. A new sanitizeUrl() helper now restricts these to safe schemes. The filter URL — whose fetch response is injected via innerHTML — is additionally required to be same-origin, so it can never load attacker-controlled remote HTML.

2. Uploaded file name rendered as HTML (field-file-upload.js) — the user-controlled file name was written via innerHTML, so a file named e.g. <img src=x onerror=…> could run script. Switched to textContent.

3. Fragile slug confirm-text decoding (field-slug.js) — the lock-button confirmation message ran through a replace/JSON.parse/decodeURIComponent chain that didn't escape backslashes (CodeQL: incomplete string escaping). The attribute is already a plain, escaped string, so it's now passed directly to confirm().

@javiereguiluz javiereguiluz added this to the 4.x milestone May 27, 2026
@javiereguiluz javiereguiluz force-pushed the fix_scanning_issues branch from eb5ae00 to b8d5dd1 Compare May 27, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant