Files
archy/apps/qortal/validate-settings.sh
ssmithx 4cc625e4d1 fix(qortal): enforce settings and honour icon-grid prompt policy
Parse settings with jq and require explicit safe booleans before listeners start. Reject missing/malformed configuration and multiple JSON documents. Honour prompt_before_launch in the icon-grid flow and cover false, true and legacy absent flags.

Validation: 17 focused frontend tests, 4 Python guard tests, shell syntax checks, Qortal manifest preflight and diff check passed. Image rebuild and live-node lifecycle acceptance remain pending.
2026-10-21 13:48:23 +00:00

12 lines
451 B
Bash

#!/bin/sh
# Fail closed: require explicit security settings, independent of upstream
# defaults and JSON formatting. Never print the operator's configuration.
if ! jq -e -s '
length == 1 and
(.[0] | type == "object" and
.localAuthBypassEnabled == false and .apiRestricted == true)
' "$1" >/dev/null 2>&1; then
echo 'ERROR: settings must be one JSON object with localAuthBypassEnabled=false and apiRestricted=true' >&2
exit 78
fi