Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix empty ssh key importing in ldap #5984
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.
@@ Coverage Diff @@ ## master #5984 +/- ## ========================================= Coverage ? 38.79% ========================================= Files ? 330 Lines ? 48731 Branches ? 0 ========================================= Hits ? 18904 Misses ? 27088 Partials ? 2739