Verify a shared secret is set

This commit is contained in:
Till Faelligen 2022-08-16 12:50:42 +02:00
parent 0642ffc0f6
commit e061b64eef
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -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)