Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Validate IP addresses upon opening new sockets#3

Merged
includesec-kris merged 5 commits intoIncludeSecurity:mainfrom
JordanMilne:check_socket_opens
Jan 17, 2023
Merged

Validate IP addresses upon opening new sockets#3
includesec-kris merged 5 commits intoIncludeSecurity:mainfrom
JordanMilne:check_socket_opens

Conversation

@JordanMilne
Copy link
Copy Markdown
Contributor

Fixes #2.

Instead of rewriting the hostname to be the IP address, instead we
look at the resolved IP just before cURL opens the socket. This is
fine since cURL's connection pools are per-handle so we don't have
to worry about keep-alive and other handles' connections.

This is also enabled by default because unlike the previous DNS pinning
implementation this won't break the TLS stack's CN validation.

This negates the need for DNS pinning, so enabling DNS pinning is
now effectively a no-op.

urllib and urlparse are parts of the stdlib
Fixes IncludeSecurity#2.

Instead of rewriting the hostname to be the IP address, instead we
look at the resolved IP just before cURL opens the socket. This is
fine since cURL's connection pools are per-handle so we don't have
to worry about keep-alive and other handles' connections.

This negates the need for DNS pinning, so enabling DNS pinning is
now effectively a no-op.
@includesec-kris includesec-kris merged commit 7927cea into IncludeSecurity:main Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add address check inside OPENSOCKET callback

2 participants