You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setup-ssl.sh writes the HOST environment variable straight into a sed substitution when it builds the certificate config, and doesn't check the value first (setup-ssl.sh:18-19):
sed -i'' -e "s/^DNS\.1 = .*/DNS.1 = $HOST:*/" "$CERT_DIR/csr.conf"
sed -i'' -e "s/^DNS\.1 = .*/DNS.1 = $HOST:*/" "$CERT_DIR/cert.conf"
HOST should be a hostname or IP address. Only the person running the container can set it, but nothing stops an unexpected value from producing a broken certificate or unexpected script behavior.
Proposal
Check HOST against a hostname-safe character set (letters, digits, hyphens, dots) before it reaches the sed calls. When it doesn't match, fail with a clear message that names HOST.
setup-ssl.shwrites theHOSTenvironment variable straight into asedsubstitution when it builds the certificate config, and doesn't check the value first (setup-ssl.sh:18-19):HOSTshould be a hostname or IP address. Only the person running the container can set it, but nothing stops an unexpected value from producing a broken certificate or unexpected script behavior.Proposal
Check
HOSTagainst a hostname-safe character set (letters, digits, hyphens, dots) before it reaches thesedcalls. When it doesn't match, fail with a clear message that namesHOST.Related issues
Important
Internal only — this issue is maintained by the core team and is not accepting external contributions.