Commit 69a28d5f authored by Stan Hu's avatar Stan Hu

Simplify rescuing of clean_encoding

parent 094a2590
...@@ -98,11 +98,9 @@ module EE ...@@ -98,11 +98,9 @@ module EE
# net-ldap only returns ASCII-8BIT and does not support UTF-8 out-of-the-box: # net-ldap only returns ASCII-8BIT and does not support UTF-8 out-of-the-box:
# https://github.com/ruby-ldap/ruby-net-ldap/issues/4 # https://github.com/ruby-ldap/ruby-net-ldap/issues/4
def clean_encoding(dn) def clean_encoding(dn)
begin
dn.force_encoding('UTF-8') dn.force_encoding('UTF-8')
rescue rescue
dn dn
end
end end
def member_uid_to_dn(uid) def member_uid_to_dn(uid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment