From 9fc61cae484d4a7ec493b99d49d9a702ecadb28f Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 28 May 2024 08:57:30 +0200 Subject: [PATCH] install: Force DisableRegistration on during install When installing Forgejo via the on-line installer, force DisableRegistration to true, to discourage creating instances with open registration. Because open registration requires constant vigil to fight off spammers of all kinds, it is not a great default. It should be a conscious decision. This change is made in an effort to make the choice of running an instance with open registration a conscious choice, rather than simply the default. Partially addresses #3925. Signed-off-by: Gergely Nagy --- routers/install/install.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/install/install.go b/routers/install/install.go index b84d77cfc..8f4fafa6f 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -151,7 +151,7 @@ func Install(ctx *context.Context) { form.EnableOpenIDSignIn = setting.Service.EnableOpenIDSignIn form.EnableOpenIDSignUp = setting.Service.EnableOpenIDSignUp - form.DisableRegistration = setting.Service.DisableRegistration + form.DisableRegistration = true // Force it to true, for the installation, to discourage creating instances with open registration, which invite all kinds of spam. form.AllowOnlyExternalRegistration = setting.Service.AllowOnlyExternalRegistration form.EnableCaptcha = setting.Service.EnableCaptcha form.RequireSignInView = setting.Service.RequireSignInView