Repository: couchdb-couch Updated Branches: refs/heads/master 65ed08516 -> 569338222
use existing salt during sha1->pbkdf2 upgrade to avoid conflicts Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/56933822 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/56933822 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/56933822 Branch: refs/heads/master Commit: 569338222a9ee38c35d2270b2a2a405be26a0828 Parents: 65ed085 Author: Robert Newson <[email protected]> Authored: Tue May 19 13:05:46 2015 +0100 Committer: Robert Newson <[email protected]> Committed: Tue May 19 13:05:46 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/56933822/src/couch_users_db.erl ---------------------------------------------------------------------- diff --git a/src/couch_users_db.erl b/src/couch_users_db.erl index 3b76862..74ff090 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_uuids:random(), + Salt = couch_util:get_value(?SALT, Body, couch_uuids:random()), DerivedKey = couch_passwords:pbkdf2(ClearPassword, Salt, Iterations), Body0 = [{?PASSWORD_SCHEME, ?PBKDF2}, {?ITERATIONS, Iterations}|Body], Body1 = ?replace(Body0, ?DERIVED_KEY, DerivedKey),
