Skip to content

Fix data: URI bypass restricted to src (#25) - #30

Open
GreggFranklin wants to merge 1 commit into
groundhoggwp:masterfrom
GreggFranklin:fix-issue-25
Open

Fix data: URI bypass restricted to src (#25)#30
GreggFranklin wants to merge 1 commit into
groundhoggwp:masterfrom
GreggFranklin:fix-issue-25

Conversation

@GreggFranklin

Copy link
Copy Markdown

Fix #25 - What changed: href and action now always go through esc_url(), which rejects data: (and javascript:) schemes — closing them as a redirect/script vector. The base64 exemption survives only for src, and I tightened the check from strpos(...) === false to === 0 so the data:image/png;base64, prefix must appear at the start of the value, not anywhere in it (previously a crafted string containing that substring mid-value would skip escaping entirely).

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.

data: URI bypass restricted to src

1 participant