Hub 2.3.3: refuse server settings the apps can't start with

TRUST_PROXY=TRUE made an Events install build for minutes, then crash at
startup. Saving a server's configuration now refuses it, and installs and
updates are refused (CONFIG_INVALID) while an older saved configuration has
one. Contracts 1.6.0 vendored (agent.checkEnvValue / invalidValues).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 10:25:57 +02:00
co-authored by Claude Opus 5.5
parent 166ea451f4
commit 94230d0ba9
13 changed files with 55 additions and 15 deletions
+10 -1
View File
@@ -40,4 +40,13 @@ async function missingFor(product, version, serverValues, defaults) {
return { server: agent.missingRequired(template, 'server', serverValues), defaults: agent.missingRequired(template, 'defaults', defaults) };
}
module.exports = { envTemplate, missingFor, _cache: cache, getSettings };
/**
* Values the apps can't start with, as sentences (e.g. TRUST_PROXY=TRUE, which crashed the Events
* backend after an install's build). Saving a configuration checks them too, but configurations
* saved before Hub 2.3.3 weren't checked.
*/
function invalidFor(serverValues, defaults) {
return [...Object.values(agent.invalidValues(serverValues || {})), ...Object.values(agent.invalidValues(defaults || {}))];
}
module.exports = { envTemplate, missingFor, invalidFor, _cache: cache, getSettings };