summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_auth.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-09-09 16:53:49 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-09-09 16:53:49 +0000
commit9b78e1555d73c888fedaa0b9d256abaeaadbe41a (patch)
tree921f620daaeb7116e5511db830e5ecb6d0498f98 /src/couchdb/couch_httpd_auth.erl
parent85d1cbfc79eb0a04ec7f16624d6290920b4355ac (diff)
choice of uuid algos for better insert perf. Closes COUCHDB-465. Thanks rnewson, bitdiddle
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@813051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_auth.erl')
-rw-r--r--src/couchdb/couch_httpd_auth.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_auth.erl b/src/couchdb/couch_httpd_auth.erl
index c77376b2..1c1ad0a9 100644
--- a/src/couchdb/couch_httpd_auth.erl
+++ b/src/couchdb/couch_httpd_auth.erl
@@ -381,9 +381,9 @@ create_user_req(#httpd{method='POST', mochi_req=MochiReq}=Req, Db) ->
[?l2b(R) || R <- Roles]
end,
- UserSalt = couch_util:new_uuid(),
+ UserSalt = couch_uuids:random(),
PasswordHash = hash_password(Password, UserSalt),
- DocId = couch_util:new_uuid(),
+ DocId = couch_uuids:random(),
{ok, UserDoc} = user_doc(DocId, UserName, UserSalt, PasswordHash, Email, Active, Roles1),
{ok, _Rev} = couch_db:update_doc(Db, UserDoc, []),
?LOG_DEBUG("User ~s (~s) with password, ~s created.", [?b2l(UserName), ?b2l(DocId), ?b2l(Password)]),