aboutsummaryrefslogtreecommitdiff
path: root/cmd/create-account
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2021-03-08 13:19:02 +0000
committerGitHub <noreply@github.com>2021-03-08 13:19:02 +0000
commit850abb1dde2ce6f85554457e3ee94a9837e13897 (patch)
tree4b9068e9e4bca77ac1be1291c10fc53d8a704648 /cmd/create-account
parentc3ad2cca49a7ad5890dddf2d8eec3e3cbbff16d1 (diff)
Make bcrypt cost configurable (#1793)
Diffstat (limited to 'cmd/create-account')
-rw-r--r--cmd/create-account/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go
index bba2d55d..22732c51 100644
--- a/cmd/create-account/main.go
+++ b/cmd/create-account/main.go
@@ -24,6 +24,7 @@ import (
"github.com/matrix-org/dendrite/setup/config"
"github.com/matrix-org/dendrite/userapi/storage/accounts"
"github.com/sirupsen/logrus"
+ "golang.org/x/crypto/bcrypt"
)
const usage = `Usage: %s
@@ -57,7 +58,7 @@ func main() {
accountDB, err := accounts.NewDatabase(&config.DatabaseOptions{
ConnectionString: cfg.UserAPI.AccountDatabase.ConnectionString,
- }, cfg.Global.ServerName)
+ }, cfg.Global.ServerName, bcrypt.DefaultCost)
if err != nil {
logrus.Fatalln("Failed to connect to the database:", err.Error())
}