summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2025-07-06 05:29:01 +0000
committerGo MAEDA <maeda@farend.jp>2025-07-06 05:29:01 +0000
commit8e3d2e92674e876ea53c63b461b607401932d01e (patch)
tree03f88c0dfac77636797dfacbe6bcc23dd3175121
parente93a9bc5607edd75ef8fc59e42e2f624a5375231 (diff)
downloadredmine-8e3d2e92674e876ea53c63b461b607401932d01e.tar.gz
redmine-8e3d2e92674e876ea53c63b461b607401932d01e.zip
Merged r23865 from trunk to 5.1-stable (#42962).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23867 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--config/boot.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/config/boot.rb b/config/boot.rb
index cd4c5efa7..75f2782ff 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,14 +1,19 @@
# frozen_string_literal: true
-# Rack 3.1.14 or later limits query parameters to 4096 by default, which
-# prevents saving workflows with many statuses.
-# Setting RACK_QUERY_PARSER_PARAMS_LIMIT to 65536 allows handling up to
-# approximately 100 statuses.
+# Rack 3.1.14 or later sets default limits of 4MB for query string bytesize
+# and 4096 for the number of query parameters. These limits are too low
+# for Redmine and can cause the following issues:
+#
+# - The low bytesize limit prevents the mail handler from processing incoming
+# emails larger than 4MB (https://www.redmine.org/issues/42962)
+# - The low parameter limit prevents saving workflows with many statuses
+# (https://www.redmine.org/issues/42875)
#
# See also:
-# - https://www.redmine.org/issues/42875
# - https://github.com/rack/rack/blob/v3.1.16/README.md#configuration
+# - https://github.com/rack/rack/blob/v3.1.16/lib/rack/query_parser.rb#L54
# - https://github.com/rack/rack/blob/v3.1.16/lib/rack/query_parser.rb#L57
+ENV['RACK_QUERY_PARSER_BYTESIZE_LIMIT'] ||= '33554432'
ENV['RACK_QUERY_PARSER_PARAMS_LIMIT'] ||= '65536'
# Set up gems listed in the Gemfile.