summaryrefslogtreecommitdiff
path: root/lib/gitlab/database.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-08-29 17:17:37 -0500
committerRobert Speicher <rspeicher@gmail.com>2019-08-29 17:17:37 -0500
commit7698d405506bc10dfd7fb2e6e02b419dd5925725 (patch)
treeb2c188fd3bc588f15d04d8ce6137f9447f7a72c7 /lib/gitlab/database.rb
parentfa160c26b14d233eb2e3b861a0742766d1ac734b (diff)
parent090956259c47d839b136f9391c3f74255764da81 (diff)
downloadgitlab-ce-7698d405506bc10dfd7fb2e6e02b419dd5925725.tar.gz
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r--lib/gitlab/database.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb
index a12bbededc4..6ecd506d55b 100644
--- a/lib/gitlab/database.rb
+++ b/lib/gitlab/database.rb
@@ -13,6 +13,10 @@ module Gitlab
# FIXME: this should just be the max value of timestampz
MAX_TIMESTAMP_VALUE = Time.at((1 << 31) - 1).freeze
+ # The maximum number of characters for text fields, to avoid DoS attacks via parsing huge text fields
+ # https://gitlab.com/gitlab-org/gitlab-ce/issues/61974
+ MAX_TEXT_SIZE_LIMIT = 1_000_000
+
# Minimum schema version from which migrations are supported
# Migrations before this version may have been removed
MIN_SCHEMA_VERSION = 20190506135400