summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/couchdb/couch_httpd_auth.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_auth.erl b/src/couchdb/couch_httpd_auth.erl
index 08841fb67..abc2054ba 100644
--- a/src/couchdb/couch_httpd_auth.erl
+++ b/src/couchdb/couch_httpd_auth.erl
@@ -367,7 +367,9 @@ authenticate(Pass, UserProps) ->
{couch_passwords:simple(Pass, UserSalt),
couch_util:get_value(<<"password_sha">>, UserProps, nil)};
<<"pbkdf2">> ->
- Iterations = couch_util:get_value(<<"iterations">>, UserProps, 10000),
+ Iterations = couch_util:to_integer(
+ couch_util:get_value(<<"iterations">>, UserProps, 10000)
+ ),
{couch_passwords:pbkdf2(Pass, UserSalt, Iterations),
couch_util:get_value(<<"derived_key">>, UserProps, nil)}
end,