jiahuili430 commented on a change in pull request #3583:
URL: https://github.com/apache/couchdb/pull/3583#discussion_r640046765



##########
File path: src/couch/src/couch_passwords.erl
##########
@@ -37,18 +37,18 @@ hash_admin_password(ClearPassword) when 
is_list(ClearPassword) ->
     hash_admin_password(?l2b(ClearPassword));
 hash_admin_password(ClearPassword) when is_binary(ClearPassword) ->
     %% Support both schemes to smooth migration from legacy scheme
-    Scheme = config:get("couch_httpd_auth", "password_scheme", "pbkdf2"),
+    Scheme = chttpd_util:get_chttpd_auth_config("password_scheme", "pbkdf2"),
     hash_admin_password(Scheme, ClearPassword).
 
 hash_admin_password("simple", ClearPassword) -> % deprecated
     Salt = couch_uuids:random(),
     Hash = crypto:hash(sha, <<ClearPassword/binary, Salt/binary>>),
     ?l2b("-hashed-" ++ couch_util:to_hex(Hash) ++ "," ++ ?b2l(Salt));
 hash_admin_password("pbkdf2", ClearPassword) ->
-    Iterations = config:get("couch_httpd_auth", "iterations", "10000"),
+    Iterations = chttpd_util:get_chttpd_auth_config("iterations", "10"),

Review comment:
       `Iterations` is used in the `DerivedKey` (line 51 & 54), I need to keep 
`Iterations` return String "10" instead of Integer 10.
   Thanks for the review, @iilyak 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to