Skip to content

fix(webhooks): block root-dotted internal hosts - #60

Closed
qwenbona wants to merge 1 commit into
moshcoder:masterfrom
qwenbona:fix/webhooks-root-dot-ssrf
Closed

fix(webhooks): block root-dotted internal hosts#60
qwenbona wants to merge 1 commit into
moshcoder:masterfrom
qwenbona:fix/webhooks-root-dot-ssrf

Conversation

@qwenbona

Copy link
Copy Markdown
Contributor

DNS allows a trailing root dot: localhost. resolves identically to localhost, and metadata.google.internal. to the metadata endpoint. The string comparisons missed these forms. Normalize by stripping a trailing dot before the internal-hostname checks.

Fixes #52

DNS allows a trailing root dot: 'localhost.' resolves identically to
'localhost', and 'metadata.google.internal.' to the metadata endpoint.
The string comparisons missed these forms. Normalize by stripping a
trailing dot before the internal-hostname checks.

Fixes moshcoder#52
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