Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the patch to SSLSocket still necessary? The ipaddr parameter could be used #72

Closed
collimarco opened this issue Nov 3, 2024 · 4 comments · Fixed by #73
Closed

Is the patch to SSLSocket still necessary? The ipaddr parameter could be used #72

collimarco opened this issue Nov 3, 2024 · 4 comments · Fixed by #73

Comments

@collimarco
Copy link

Maybe I am missing something but I think that the validation flow should be:

  1. Resolve the hostname to an IP address
  2. Use Net::HTTP#start with the ipaddr parameter to connect to that IP address
  3. The SNI and Host header are populated normally from the original URL (using ipaddr doesn't alter them)

This would make the monkeypatch unnecessary.

@arkadiyt
Copy link
Owner

arkadiyt commented Nov 3, 2024

Thanks for flagging, this option didn't exist when ssrf_filter was originally written. It looks like it's only supported on ruby 2.7+ so I'd have to drop ruby 2.6 support to use this, but that seems ok

@arkadiyt
Copy link
Owner

arkadiyt commented Nov 3, 2024

Given that there's no external changes I'm inclined to not release a new version for this, but let me know if you need this for some reason

@collimarco
Copy link
Author

@arkadiyt Thanks for the quick reply! If you release a new gem version that would make it easier to use the latest version (I would prefer to avoid patches to SSLSocket)

@arkadiyt
Copy link
Owner

arkadiyt commented Nov 8, 2024

Published 1.2.0

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 a pull request may close this issue.

2 participants