Skip to content

fix: render API error text safely to avoid XSS#22

Merged
gushishang merged 1 commit into
mainfrom
codex/inspect-scan-for-potential-xss-vulnerabilities
May 5, 2026
Merged

fix: render API error text safely to avoid XSS#22
gushishang merged 1 commit into
mainfrom
codex/inspect-scan-for-potential-xss-vulnerabilities

Conversation

@wsxiaolin

Copy link
Copy Markdown
Member

Motivation

  • Prevent rendering untrusted API/backend message strings as HTML in the error dialog which created an XSS sink when showAPiError forwarded res.Message into the component.

Description

  • Replaced v-html with plain text interpolation {{ displayMessage }} in src/components/popup/ApiErrorDialog.vue so API-provided message strings are not interpreted as HTML.

Testing

  • Ran a production build with npm run -s build, which completed successfully.

Codex Task

@gushishang

Copy link
Copy Markdown
Member

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gushishang gushishang merged commit 03cc3de into main May 5, 2026
1 check passed
@gushishang gushishang deleted the codex/inspect-scan-for-potential-xss-vulnerabilities branch May 5, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants