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

case-insensitive LDAP group comparison #9926

Merged
merged 2 commits into from
May 8, 2018
Merged

Conversation

zdzichu
Copy link
Contributor

@zdzichu zdzichu commented Nov 20, 2017

According to RFC2251 4.1.5, LDAP strings are case-insensitive. Disregard case when comparing group mappings.

@CLAassistant
Copy link

CLAassistant commented Nov 20, 2017

CLA assistant check
All committers have signed the CLA.

@grafana grafana deleted a comment from codecov-io Nov 21, 2017
Copy link
Contributor

@bergquist bergquist left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to contribute to Grafana.

One minor question about it.

if member == group {
return true
}
return strings.EqualFold(member, group)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure this is correct.

If the user is part of two groups it will always return based on the match of the first group. I don't think that's what you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I'll update the PR.

According to RFC2251 4.1.5, LDAP strings are case-insensitive. Disregard case when comparing group mappings.
@zdzichu
Copy link
Contributor Author

zdzichu commented Mar 14, 2018

Hey, can you re-reviews? I believe I've implemented requested changes.

@torkelo torkelo merged commit e1b9d36 into grafana:master May 8, 2018
@torkelo torkelo added this to the 5.2 milestone May 8, 2018
ryantxu added a commit to NatelEnergy/grafana that referenced this pull request May 8, 2018
* grafana/master:
  Templating : return __empty__ value when all value return nothing to prevent elasticsearch syntaxe error (grafana#9701)
  http_server: All files in public/build have now a huge max-age (grafana#11536)
  fix: ldap unit test
  only error log when err is not nil
  rename alerting engine to service
  case-insensitive LDAP group comparison (grafana#9926)
  changelog: add notes about closing grafana#11813
  docs: updated changelog
  fix XSS vulnerabilities in dashboard links (grafana#11813)
  PR: ux changes to grafana#11528
  decrease length of auth_id column in user_auth table
  PR comments
  Make dashboard JSON editable
@ying-jeanne ying-jeanne added the pr/external This PR is from external contributor label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/external This PR is from external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants