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
{{ message }}
Repository navigation
A dashboard password longer than 72 bytes passes validation and then fails at hashing with a misleading message #4487
P2-correctnessReal defect, not yet user-visible. After P1, before any P3/P4blockedWaiting on another issue or a release; the runner clears it when that closesbugSomething isn't workingsetupConfiguration and first-run setup
parse_and_validate_config (lib/pithead/28-parse-and-validate-config.sh) accepts a dashboard.auth.password of 8 to 128 characters. The password is then hashed with caddy hash-password in the pinned Caddy image (caddy_hash_password_b64 in lib/pithead/35-caddyfile-and-auth-helpers.sh). That command refuses any input longer than 72 bytes: bcrypt: password length exceeds 72 bytes.
So a password of 73 to 128 ASCII characters, or of 37 or more two-byte letters, passes validation and then stops apply with "Could not hash dashboard.auth.password (is Docker running and the Caddy image pulled? Run './pithead setup' first)."
docs/configuration.md says any 8–128-character string works.
What it impacts
An operator who picks a long passphrase. apply stops, and the message points at Docker and the image, not at the length of the password.
How I found it
While reviewing the fix for #4453. The pinned Caddy image was run with no network:
Unknown: whether any install holds a longer password whose hash an older Caddy made without this error. The validator keeps the stored hash while the password is unchanged (prev_fp and prev_hash), so such an install works until the password changes.
How important is it
Low to medium. It fails closed and a shorter password works, but the message misleads and the documented limit is wrong.
Acceptance criteria
Validation refuses a new password longer than 72 bytes with a message that names the limit, before hashing is tried. A test covers 73 ASCII characters and 37 two-byte characters.
An install whose password is unchanged and already has a stored hash is not refused after an upgrade.
docs/configuration.md and the error text state the real limit.
Possible solutions
Smallest: a byte-length check next to the existing length check, applied only when the password differs from the stored fingerprint.
Alternative: keep the rule and map the hashing failure to a clear message.
P2-correctnessReal defect, not yet user-visible. After P1, before any P3/P4blockedWaiting on another issue or a release; the runner clears it when that closesbugSomething isn't workingsetupConfiguration and first-run setup
Activity
pithead-developer commentedon Nov 24, 2026
Blocked on #4453
The fix for #4453 (#4484) changes the same validation lines. This one should start after that merges.