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

fix: npe if ldap query doesn't return attributes #2151

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

rchincha
Copy link
Contributor

We cannot assume the LDAP server will have group attributes programmed everytime. So handle it accordingly.

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2a6bf66) 92.12% compared to head (52a9ebd) 92.14%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2151      +/-   ##
==========================================
+ Coverage   92.12%   92.14%   +0.01%     
==========================================
  Files         165      165              
  Lines       28760    28767       +7     
==========================================
+ Hits        26494    26506      +12     
+ Misses       1671     1667       -4     
+ Partials      595      594       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andaaron andaaron left a comment

Choose a reason for hiding this comment

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

Maybe we should also take in consideration not adding the user group attribute in it if it has empty string value, at line 177?

@rchincha rchincha added this to the v2.0.1 milestone Jan 6, 2024
@rchincha rchincha requested a review from andaaron January 11, 2024 21:39
We cannot assume the LDAP server will have group attributes programmed
everytime. So handle it accordingly.

Signed-off-by: Ramkumar Chinchani <[email protected]>
@rchincha rchincha merged commit d685adb into project-zot:main Jan 12, 2024
33 checks passed
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