Repository: couchdb-couch Updated Branches: refs/heads/master 569338222 -> 1d28fd367
Revert "use existing salt during sha1->pbkdf2 upgrade to avoid conflicts" This reverts commit 569338222a9ee38c35d2270b2a2a405be26a0828. I think I'm wrong about conflicts, we update the document before we write (in fabric). Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/1d28fd36 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/1d28fd36 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/1d28fd36 Branch: refs/heads/master Commit: 1d28fd3673fda986c615bae4601bdd9d4b771d21 Parents: 5693382 Author: Robert Newson <[email protected]> Authored: Tue May 19 13:11:28 2015 +0100 Committer: Robert Newson <[email protected]> Committed: Tue May 19 13:11:28 2015 +0100 ---------------------------------------------------------------------- src/couch_users_db.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/1d28fd36/src/couch_users_db.erl ---------------------------------------------------------------------- diff --git a/src/couch_users_db.erl b/src/couch_users_db.erl index 74ff090..3b76862 100644 --- a/src/couch_users_db.erl +++ b/src/couch_users_db.erl @@ -64,7 +64,7 @@ save_doc(#doc{body={Body}} = Doc) -> Doc; ClearPassword -> Iterations = list_to_integer(config:get("couch_httpd_auth", "iterations", "1000")), - Salt = couch_util:get_value(?SALT, Body, couch_uuids:random()), + Salt = couch_uuids:random(), DerivedKey = couch_passwords:pbkdf2(ClearPassword, Salt, Iterations), Body0 = [{?PASSWORD_SCHEME, ?PBKDF2}, {?ITERATIONS, Iterations}|Body], Body1 = ?replace(Body0, ?DERIVED_KEY, DerivedKey),
