Settings: Support null and undefined env var substitutions

This commit is contained in:
Richard Hansen 2021-06-06 02:14:50 -04:00
parent 299dbbe7e6
commit c7bb18c6da
4 changed files with 65 additions and 10 deletions

View file

@ -10,6 +10,19 @@
connections to the MySQL/MariaDB server (by default) instead of 1. This might
cause Etherpad to crash with a "ER_CON_COUNT_ERROR: Too many connections"
error if your server is configured with a low connection limit.
* Changes to environment variable substitution in `settings.json` (see the
documentation comments in `settings.json.template` for details):
* An environment variable set to the string "null" now becomes `null` instead
of the string "null". Similarly, if the environment variable is unset and
the default value is "null" (e.g., `"${UNSET_VAR:null}"`), the value now
becomes `null` instead of the string "null". It is no longer possible to
produce the string "null" via environment variable substitution.
* An environment variable set to the string "undefined" now causes the setting
to be removed instead of set to the string "undefined". Similarly, if the
environment variable is unset and the default value is "undefined" (e.g.,
`"${UNSET_VAR:undefined}"`), the setting is now removed instead of set to
the string "undefined". It is no longer possible to produce the string
"undefined" via environment variable substitution.
### Notable enhancements