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

Add EqualFold function on AttributeTypeAndValue. #307

Merged
merged 2 commits into from
Apr 16, 2021

Conversation

zerodayz
Copy link
Contributor

@zerodayz zerodayz commented Jan 27, 2021

Since v3 ldap we have case insensitive search in parallel to a case sensitive search:

#111

I would like to propose to add an EqualFold function in parallel to Equal function in dn.go on AttributeTypeAndValue.

So we can not only search in case sensitive but also compare RDNs.

@zerodayz zerodayz force-pushed the LDAP-CaseInsensitiveSearch branch 2 times, most recently from 4d4c7a2 to 977775c Compare January 30, 2021 12:36
@zerodayz zerodayz changed the title LDAP DN compare should not be case sensitive Add EqualFold function on AttributeTypeAndValue. Jan 30, 2021
@zerodayz zerodayz force-pushed the LDAP-CaseInsensitiveSearch branch 4 times, most recently from 61f2bcc to 6841802 Compare January 30, 2021 12:59
@zerodayz
Copy link
Contributor Author

@liggitt @johnweldon We already have a search that is case sensitive (since v3) and would be beneficial if we can also have RND compare functions as case insensitive.

@stefanmcshane
Copy link
Contributor

Hi @zerodayz, please apply the changes to v3/ folder's relevant files and rebase so we can consider merging.

Ill review this weekend to get a new release out this week then.

Thanks,
Stefan

@zerodayz zerodayz force-pushed the LDAP-CaseInsensitiveSearch branch from 6841802 to 7a1b50d Compare April 5, 2021 22:55
@zerodayz
Copy link
Contributor Author

zerodayz commented Apr 5, 2021

Hi @stefanmcshane, applied changes to v3 directory. Thank you Stefan

@stefanmcshane
Copy link
Contributor

Hi @zerodayz,
The latest commit seems to have removed the changes from the project root. Whilst it is a little confusing, we are currently supporting 2 versions of the ldap library in 1 repo.
The code inside v3/ folder is what gets pulled when running with go modules, and the code at the project root is what gets pulled when working without go modules. As such, if you could ensure the changes are in both v3/dn.go and dn.go, that would ensure the 2 versions are in sync.
We have plans to deprecated support for no-go module version in the not-too-distant future to avoid this confusion.

Thanks for your help and contribution,
Stefan

Since v3 ldap we have case insensitive search in parallel to a case sensitive search:

I would like to propose to add an EqualFold function in parallel to Equal function in dn.go on AttributeTypeAndValue.

So we can not only search in case sensitive but also compare RDNs.
@zerodayz zerodayz force-pushed the LDAP-CaseInsensitiveSearch branch from 7a1b50d to acf2a83 Compare April 7, 2021 20:57
@zerodayz
Copy link
Contributor Author

zerodayz commented Apr 7, 2021

@stefanmcshane I have added those back into root.

@stefanmcshane stefanmcshane merged commit 9b5f02b into go-ldap:master Apr 16, 2021
@stefanmcshane
Copy link
Contributor

stefanmcshane commented Apr 16, 2021

Merged this - If you get a chance to write some supporting unit tests, those would be greatly appreciated. Ill cut a new release with this and other changes this weekend.

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