Fix XSS vulnerability in SetAttribute (#12) #32
Reference in New Issue
Block a user
Delete Branch "fix/escape-javascript-xss"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
SetAttributewith Playwright'sEvaluateargument passing, structurally eliminating the XSS injection surfaceescapeJavaScripthelper which only escaped\and', missing", backticks, newlines, null bytes, and unicode separatorsTest plan
go build ./...passesgo test ./...passesSetAttributewith malicious payloads (e.g.,'); alert('xssor backtick injection) and confirm they are set literally as attribute valuesCloses #12
Parent: #31 (Phase 1, PR 1)
🤖 Generated with Claude Code