You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by kl...@apache.org on 2015/08/10 21:46:35 UTC

[09/15] couchdb-peruser git commit: Fix `user_db_name/1`

Fix `user_db_name/1`

Alphabetic characters must be in lower case.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/commit/50c153ac
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/tree/50c153ac
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/diff/50c153ac

Branch: refs/heads/master
Commit: 50c153ac17fdb8f212d6505141588c2215e8d3fd
Parents: 70146b4
Author: Klaus Trainer <kl...@posteo.de>
Authored: Mon Aug 10 17:45:04 2015 +0200
Committer: Klaus Trainer <kl...@posteo.de>
Committed: Mon Aug 10 17:45:04 2015 +0200

----------------------------------------------------------------------
 src/couchdb_peruser.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-peruser/blob/50c153ac/src/couchdb_peruser.erl
----------------------------------------------------------------------
diff --git a/src/couchdb_peruser.erl b/src/couchdb_peruser.erl
index 9eff36c..f6cd59a 100644
--- a/src/couchdb_peruser.erl
+++ b/src/couchdb_peruser.erl
@@ -138,7 +138,8 @@ ensure_security(User, UserDb) ->
     end.
 
 user_db_name(User) ->
-    HexUser = list_to_binary([integer_to_list(X, 16) || <<X>> <= User]),
+    HexUser = list_to_binary(
+        [string:to_lower(integer_to_list(X, 16)) || <<X>> <= User]),
     <<?USERDB_PREFIX, HexUser/binary>>.
 
 handle_call(_Msg, _From, State) ->