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

Ensure LDAP wildcards won't make it into the filter. #9

Merged
merged 4 commits into from
Nov 1, 2013
Merged

Conversation

sbryant
Copy link
Member

@sbryant sbryant commented Oct 31, 2013

This fixes github/enterprise#980. Please see the issue for details.

/cc @github/enterprise-ops @github/security

@@ -73,8 +73,9 @@ def valid_login?(login, password)
# Returns the user if the login matches any `uid`.
# Returns nil if there are no matches.
def user?(login)
escaped_login = Net::LDAP::escape(login)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Net::LDAP::Filter.escape?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed the actual class. 👊

@@ -73,8 +73,9 @@ def valid_login?(login, password)
# Returns the user if the login matches any `uid`.
# Returns nil if there are no matches.
def user?(login)
escaped_login = Net::LDAP::Filter.escape(login)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sbryant sbryant closed this Nov 1, 2013
@sbryant sbryant reopened this Nov 1, 2013
sbryant added a commit that referenced this pull request Nov 1, 2013
Ensure LDAP wildcards won't make it into the filter.
@sbryant sbryant merged commit 0a18250 into master Nov 1, 2013
@sbryant sbryant deleted the escape-uid branch November 1, 2013 20:13
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