Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fixed nil error on ldap find_entries_by

Alex Fantini72cb9baa7178
diff --git a/app/services/ldap/base_service.rb b/app/services/ldap/base_service.rb
index a2afb8b3642..00ce75cb121 100644
--- a/app/services/ldap/base_service.rb
+++ b/app/services/ldap/base_service.rb
@@ -124,7 +124,7 @@ module Ldap
filter: ldap.login_filter(login),
attributes: ldap.search_attributes
)
- .map { |entry| ldap.get_user_attributes_from_ldap_entry(entry).except(:dn) }
+ &.map { |entry| ldap.get_user_attributes_from_ldap_entry(entry).except(:dn) } || []
end
def new_ldap_connection