rnewson commented on code in PR #5820:
URL: https://github.com/apache/couchdb/pull/5820#discussion_r2599249096
##########
src/couch/src/couch_password_hasher.erl:
##########
@@ -40,7 +43,7 @@
maybe_upgrade_password_hash(Req, UserName, Password, UserProps, AuthModule,
AuthCtx) ->
UpgradeEnabled = config:get_boolean("chttpd_auth", "upgrade_hash_on_auth",
true),
- IsDoc = is_doc(UserProps),
+ IsDoc = ?MODULE:is_doc(UserProps),
Review Comment:
why do this?
##########
src/couch/src/couch_password_hasher.erl:
##########
@@ -122,7 +125,7 @@ needs_upgrade(UserProps) ->
"iterations", 600000
),
case {TargetScheme, TargetIterations, TargetPRF} of
- {CurrentScheme, CurrentIterations, _} when CurrentScheme ==
<<"simple">> ->
+ {CurrentScheme, _, _} when CurrentScheme == <<"simple">>,
CurrentIterations =:= undefined ->
Review Comment:
I don't recall why I did this with `when` clauses originally, but with your
change a match on `{<<"simple">>, undefined, _}` would read better.
##########
src/couch/src/couch_password_hasher.erl:
##########
@@ -141,7 +144,7 @@ worker_loop(Parent) ->
receive
{upgrade_password_hash, Req, UserName, Password, UserProps,
AuthModule, AuthCtx} ->
couch_log:notice("upgrading stored password hash for '~s' (~p)",
[UserName, AuthCtx]),
- upgrade_password_hash(Req, UserName, Password, UserProps,
AuthModule, AuthCtx),
+ ?MODULE:upgrade_password_hash(Req, UserName, Password, UserProps,
AuthModule, AuthCtx),
Review Comment:
again, not sure why we'd force ourselves over the newer module for this
function
--
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]