-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 empty ssh key importing in ldap #5984
Fix empty ssh key importing in ldap #5984
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5984 +/- ##
=========================================
Coverage ? 38.79%
=========================================
Files ? 330
Lines ? 48731
Branches ? 0
=========================================
Hits ? 18904
Misses ? 27088
Partials ? 2739
Continue to review full report at Codecov.
|
@zeripath please backport 😄 |
I've finally put up the backport as #6009 |
The current implementation assumes that any LDAP will either return a valid SSH public key or none at all. It appears that some LDAPs will simply return "" which will cause an out of bounds in our code.
This code protects the importation of public keys by checking that these can be split in to a space separated string (presumably key type and key content - checked later). If the string provided cannot do this it is ignored.
Many thanks to @silverwind for their excellent bug report.
Fix #5975