Skip to content

[6.x] Harden URL::isExternalToApplication()#14287

Merged
jasonvarga merged 3 commits into6.xfrom
is-external-url
Mar 18, 2026
Merged

[6.x] Harden URL::isExternalToApplication()#14287
jasonvarga merged 3 commits into6.xfrom
is-external-url

Conversation

@duncanmcclean
Copy link
Member

This pull request the URL::isExternalToApplication() helper against URL credential injection.

jasonvarga and others added 2 commits March 18, 2026 12:02
Replace brittle regex with parse_url(PHP_URL_HOST) to correctly
handle userinfo@host URL injection attacks. Remove the now-unnecessary
getHostFromUrl method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasonvarga jasonvarga merged commit 0bfd904 into 6.x Mar 18, 2026
17 checks passed
@jasonvarga jasonvarga deleted the is-external-url branch March 18, 2026 16:27
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