couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [9/44] git commit: use couch_passwords
Date Tue, 04 Dec 2012 20:43:48 GMT
use couch_passwords


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

Branch: refs/heads/1368-fix-multipart-header-parts
Commit: 7b65cfb3d8abbbd973bc135e372c2b2fea57c7d7
Parents: bcdac76
Author: Robert Newson <rnewson@apache.org>
Authored: Mon Nov 12 12:13:23 2012 +0000
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Nov 12 12:13:23 2012 +0000

----------------------------------------------------------------------
 test/etap/231-cors.t |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7b65cfb3/test/etap/231-cors.t
----------------------------------------------------------------------
diff --git a/test/etap/231-cors.t b/test/etap/231-cors.t
index 3debb6b..6853c1c 100644
--- a/test/etap/231-cors.t
+++ b/test/etap/231-cors.t
@@ -49,10 +49,8 @@ dbname2() -> "etap-test-db2".
 admin_user_ctx() -> {user_ctx, #user_ctx{roles=[<<"_admin">>]}}.
 
 set_admin_password(UserName, Password) ->
-    Salt = binary_to_list(couch_uuids:random()),
-    Hashed = couch_util:to_hex(crypto:sha(Password ++ Salt)),
-    couch_config:set("admins", UserName,
-        "-hashed-" ++ Hashed ++ "," ++ Salt, false).
+    Hashed = couch_passwords:hash_admin_password(Password),
+    couch_config:set("admins", UserName, Hashed, false).
 
 cycle_db(DbName) ->
     couch_server:delete(list_to_binary(DbName), [admin_user_ctx()]),


Mime
View raw message