##// END OF EJS Templates
Do not request blank LDAP attributes....
Jean-Philippe Lang -
r2054:c54f15e35f37
parent child
Show More
@@ -38,7 +38,8 class AuthSource < ActiveRecord::Base
38 38 begin
39 39 logger.debug "Authenticating '#{login}' against '#{source.name}'" if logger && logger.debug?
40 40 attrs = source.authenticate(login, password)
41 rescue
41 rescue => e
42 logger.error "Error during authentication: #{e.message}"
42 43 attrs = nil
43 44 end
44 45 return attrs if attrs
@@ -91,6 +91,8 class AuthSourceLdap < AuthSource
91 91 end
92 92
93 93 def self.get_attr(entry, attr_name)
94 entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
94 if !attr_name.blank?
95 entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
96 end
95 97 end
96 98 end
General Comments 0
You need to be logged in to leave comments. Login now