Skip to content

sanitize url attributes case-insensitively#21479

Open
ubeddulla wants to merge 1 commit into
emberjs:mainfrom
ubeddulla:sanitize-url-attr-case
Open

sanitize url attributes case-insensitively#21479
ubeddulla wants to merge 1 commit into
emberjs:mainfrom
ubeddulla:sanitize-url-attr-case

Conversation

@ubeddulla

Copy link
Copy Markdown

sanitizeAttributeValue compares the attribute name against the bad-attribute lists with exact case, but normalizeProperty hands back the camelCased DOM property name (formAction) when a template writes the attribute that way, so a bound javascript:/vbscript:/data: url on something like skips the protocol check that the lowercase formaction spelling gets and reaches the element unprefixed. Lower-casing the attribute in checkURI/checkDataURI/checkDataProtocol marks the same value unsafe regardless of casing, matching how the tag name is already normalized.

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.

1 participant