Skip to content

Commit 4adbd81

Browse files
pbolingCopilot
andauthored
Update lib/omniauth-ldap/adaptor.rb
Co-authored-by: Copilot <[email protected]>
1 parent 5ab35a0 commit 4adbd81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/omniauth-ldap/adaptor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ def bind_as(args = {})
137137
if bind_args.is_a?(Hash)
138138
bind_args = bind_args.merge({controls: [control]})
139139
else
140-
# Some Net::LDAP versions allow passing a block for SASL only; ensure we still can add controls if hash
141-
# When not a Hash, we can't merge; rely on server default behavior.
140+
# Some Net::LDAP versions allow passing a block for SASL only; controls can only be added if bind_args is a Hash.
141+
# If bind_args is not a Hash (e.g., SASL returns a block or other type), the password policy control cannot be attached, and the bind will proceed without it.
142142
end
143143
end
144144

0 commit comments

Comments
 (0)