summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2020-10-07 14:24:14 -0400
committerGitHub <noreply@github.com>2020-10-07 14:24:14 -0400
commite00e8d8ad391ded1316d9dade4d2542199141be6 (patch)
treeb80b6ef6b1c41f9ee8fe7cf4066f27c86cae5bde
parente0b7727804ab80f5f65166e85bb61308af90d4c1 (diff)
downloadgitea-e00e8d8ad391ded1316d9dade4d2542199141be6.tar.gz
gitea-e00e8d8ad391ded1316d9dade4d2542199141be6.zip
Disable Git Hooks by default (#13064)
* Disable Git Hooks by default Related #13058 * pass tests
-rw-r--r--integrations/mssql.ini.tmpl3
-rw-r--r--integrations/mysql.ini.tmpl3
-rw-r--r--integrations/mysql8.ini.tmpl1
-rw-r--r--integrations/pgsql.ini.tmpl3
-rw-r--r--integrations/sqlite.ini.tmpl1
-rw-r--r--modules/setting/setting.go2
6 files changed, 9 insertions, 4 deletions
diff --git a/integrations/mssql.ini.tmpl b/integrations/mssql.ini.tmpl
index 054f848bbe..7a51871fc0 100644
--- a/integrations/mssql.ini.tmpl
+++ b/integrations/mssql.ini.tmpl
@@ -90,6 +90,7 @@ COLORIZE = true
LEVEL = Debug
[security]
+DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
-INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ \ No newline at end of file
+INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
diff --git a/integrations/mysql.ini.tmpl b/integrations/mysql.ini.tmpl
index 1bdd95834c..f10ea9f9d4 100644
--- a/integrations/mysql.ini.tmpl
+++ b/integrations/mysql.ini.tmpl
@@ -110,6 +110,7 @@ COLORIZE = true
LEVEL = Debug
[security]
+DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
-INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ \ No newline at end of file
+INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
diff --git a/integrations/mysql8.ini.tmpl b/integrations/mysql8.ini.tmpl
index e87b9c7944..d6fcbc1dd5 100644
--- a/integrations/mysql8.ini.tmpl
+++ b/integrations/mysql8.ini.tmpl
@@ -83,6 +83,7 @@ LEVEL = Debug
[security]
+DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
diff --git a/integrations/pgsql.ini.tmpl b/integrations/pgsql.ini.tmpl
index 5a2a2d6a57..523def788f 100644
--- a/integrations/pgsql.ini.tmpl
+++ b/integrations/pgsql.ini.tmpl
@@ -91,6 +91,7 @@ COLORIZE = true
LEVEL = Debug
[security]
+DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
-INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ \ No newline at end of file
+INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
diff --git a/integrations/sqlite.ini.tmpl b/integrations/sqlite.ini.tmpl
index 4c0d40cc4a..4c9dce4bb1 100644
--- a/integrations/sqlite.ini.tmpl
+++ b/integrations/sqlite.ini.tmpl
@@ -87,6 +87,7 @@ COLORIZE = true
LEVEL = Debug
[security]
+DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTI3OTU5ODN9.OQkH5UmzID2XBdwQ9TAI6Jj2t1X-wElVTjbE7aoN4I8
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index dc7697bca7..9eba731651 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -740,7 +740,7 @@ func NewContext() {
ReverseProxyAuthEmail = sec.Key("REVERSE_PROXY_AUTHENTICATION_EMAIL").MustString("X-WEBAUTH-EMAIL")
MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt(6)
ImportLocalPaths = sec.Key("IMPORT_LOCAL_PATHS").MustBool(false)
- DisableGitHooks = sec.Key("DISABLE_GIT_HOOKS").MustBool(false)
+ DisableGitHooks = sec.Key("DISABLE_GIT_HOOKS").MustBool(true)
OnlyAllowPushIfGiteaEnvironmentSet = sec.Key("ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET").MustBool(true)
PasswordHashAlgo = sec.Key("PASSWORD_HASH_ALGO").MustString("argon2")
CSRFCookieHTTPOnly = sec.Key("CSRF_COOKIE_HTTP_ONLY").MustBool(true)