Selaa lähdekoodia

Merge branch 'master' of github.com:emqtt/emqtt

Feng Lee 10 vuotta sitten
vanhempi
commit
391dacee19
1 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  1. 1 4
      apps/emqttd/src/emqttd_auth_ldap.erl

+ 1 - 4
apps/emqttd/src/emqttd_auth_ldap.erl

@@ -82,10 +82,7 @@ ldap_bind(LDAP, UserDn, Password) ->
     end.
 
 fill(Username, UserDn) ->
-    lists:append(lists:map(
-            fun("$u") -> Username;
-                (S) -> S
-            end, string:tokens(UserDn, ",="))).
+    re:replace(UserDn, "\\$u", Username, [global, {return, list}]).
 
 description() -> 
     "LDAP Authentication Module".