-
Notifications
You must be signed in to change notification settings - Fork 251
Addresses the LDAPS vulnerability to MITM attacks by properly authenticating the hostname #259
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
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
cc3f27d
Addresses the LDAPS vulnerability to MITM attacks by checking hostnam…
JPvRiel-SB 51f12c5
fix a regression in a prior commit and check if :verify_mode key exis…
JPvRiel da59fd5
second fix to conditonal logic after more extensive positive and nega…
JPvRiel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JPvRiel what was your reasoning for putting this check in
#open_connection
rather than.wrap_with_ssl
? It looks like that code path is always used when setting up SSL connections.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just a matter of not knowing much about the internals of the lib, we just found the issue while doing some SSL verification. Feel free to move it where ever is the right place for this code (you know the code better than us), we're just trying to help out on the SSL-verification case. Makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jch, I also wanted to put the code into
.wrap_with_ssl
initially. However, the current.wrap_with_ssl
function doesn't have access to any variable with the FQDN/hostname used to make the connection in order to pass that topost_connection_check
. There was another PR that attempted address this passing around the extra host info by adding an extra host parameter for the.wrap_with_ssl
function.See: #262 (comment). However, that PR had a few other unresolved questions about how it handled default validation...
One of the reasons I didn't go that way is I noticed the connection.rb code is flagged for some major refactoring anyhow, and yeah, as above, you'd be in a better place to make a call where best to inject
post_connection_check
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I forgot that it's a class method.