Updated Branches: refs/heads/431-feature_cors bcdac76ca -> 7b65cfb3d
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/431-feature_cors Commit: 7b65cfb3d8abbbd973bc135e372c2b2fea57c7d7 Parents: bcdac76 Author: Robert Newson <[email protected]> Authored: Mon Nov 12 12:13:23 2012 +0000 Committer: Robert Newson <[email protected]> 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()]),
