Commit 6a3cc97e authored by Jamie Reid's avatar Jamie Reid Committed by Shinya Maeda

Increase MAX_ACCEPTABLE_VARIABLES_COUNT to 20

Currently, the ParseDotenvArtifactService has a hardcoded limit
of 10 parsed variables per dotenv file. This change increases that
to 20.
parent 213b2354
......@@ -3,7 +3,7 @@
module Ci
class ParseDotenvArtifactService < ::BaseService
MAX_ACCEPTABLE_DOTENV_SIZE = 5.kilobytes
MAX_ACCEPTABLE_VARIABLES_COUNT = 10
MAX_ACCEPTABLE_VARIABLES_COUNT = 20
SizeLimitError = Class.new(StandardError)
ParserError = Class.new(StandardError)
......
---
title: increase allowed dotenv variables from 10 to 20
merge_request: 45815
author: jrreid
type: changed
......@@ -114,7 +114,9 @@ There are a couple of exceptions to the [original dotenv rules](https://github.c
- The variable key can contain only letters, digits, and underscores (`_`).
- The maximum size of the `.env` file is 5 KB.
- The maximum number of variables is 10.
- In GitLab 13.5 and older, the maximum number of inherited variables is 10.
- In [GitLab 13.6 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/247913),
the maximum number of inherited variables is 20.
- Variable substitution in the `.env` file is not supported.
- The `.env` file can't have empty lines or comments (starting with `#`).
- Key values in the `env` file cannot have spaces or newline characters (`\n`), including when using single or double quotes.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment