diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-08-16 13:21:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 13:21:22 +0200 |
commit | 804653e55118a8155dfbfe5187e941a2f8ce8337 (patch) | |
tree | c3c6235b703189a7a723675a16604a99d8e00054 /cmd/create-account | |
parent | 5424b88f3061dddbeae53df8b67bd064e8cbc400 (diff) |
Verify a shared secret is set in `create-account` (#2645)
Diffstat (limited to 'cmd/create-account')
-rw-r--r-- | cmd/create-account/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go index fbd14b8d..bd053f2f 100644 --- a/cmd/create-account/main.go +++ b/cmd/create-account/main.go @@ -85,6 +85,10 @@ func main() { logrus.Fatalf("The reset-password flag has been replaced by the POST /_dendrite/admin/resetPassword/{localpart} admin API.") } + if cfg.ClientAPI.RegistrationSharedSecret == "" { + logrus.Fatalln("Shared secret registration is not enabled, enable it by setting a shared secret in the config: 'client_api.registration_shared_secret'") + } + if *username == "" { flag.Usage() os.Exit(1) |