nickva commented on code in PR #4814:
URL: https://github.com/apache/couchdb/pull/4814#discussion_r1386854453


##########
dev/run:
##########
@@ -571,8 +572,8 @@ def hashify(pwd, salt=COMMON_SALT, iterations=10, 
keylen=20):
     >>> hashify(candeira)
     
-pbkdf2-99eb34d97cdaa581e6ba7b5386e112c265c5c670,d1d2d4d8909c82c81b6c8184429a0739,10
     """
-    derived_key = pbkdf2_hex(pwd, salt, iterations, keylen)
-    return "-pbkdf2-%s,%s,%s" % (derived_key, salt, iterations)
+    derived_key = pbkdf2_hex(pwd, salt, iterations, keylen, 
hashfunc=hashlib.sha256)
+    return "-pbkdf2:sha256-%s,%s,%s" % (derived_key, salt, iterations)

Review Comment:
   That explains it, thanks! As part of that setup we re-set the admin 
credentials by calling setup.erl 
[set_admin](https://github.com/apache/couchdb/blob/main/src/setup/src/setup.erl#L172).
 That sets it to plaintext password and then immediately returns. The 
config:set then asynchronously kicks of the couch_server admin re-hasher.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to