Skip to content

Fix streamed credential prompts - #4

Merged
Mammad3861 merged 2 commits into
mainfrom
fix/streamed-credential-prompt
Sep 9, 2026
Merged

Mammad3861 merged 2 commits into
mainfrom
fix/streamed-credential-prompt

Conversation

@Mammad3861

Copy link
Copy Markdown
Owner

Summary

Fix streamed installations where sequential username and password prompts could stall or lose terminal input.

Root cause

The interactive credential helpers were called through command substitutions. Each prompt therefore ran inside a separate subshell while reading from the controlling terminal, breaking sequential /dev/tty input during piped installations.

Changes

  • Assign prompt results directly to caller variables using printf -v.
  • Continue using the single controlling-terminal file descriptor.
  • Fail clearly and non-zero when credential input reaches EOF or is interrupted.
  • Keep password input hidden while supporting empty passwords.
  • Preserve the default admin username behavior.
  • Add streamed pseudo-terminal coverage for:
    • Sequential username and password input.
    • Environment username with interactive password.
    • Full environment overrides without prompts.
    • Empty/default username.
    • Interrupted or EOF input.
  • Avoid a PTY test false positive caused by pre-fed input being echoed before silent mode is enabled.

Validation

  • bash -n browser.sh tests/browser_test.sh — passed.
  • bash tests/browser_test.sh — passed locally; PTY-specific tests were skipped because util-linux script is unavailable in Git Bash.
  • GitHub Actions Ubuntu shell tests — passed.
  • Real streamed installation tested successfully on Ubuntu 26.04.1 LTS x86_64.
  • Sequential username and hidden password prompts completed successfully.
  • Chromium container started and the Chromium process was detected.
  • HTTPS endpoint on port 3001 responded with the expected 401 Unauthorized before credentials.
  • Chromium, Chrome Web Store extensions, and browser relaunch were tested successfully.

Scope

No Docker image, port mapping, Chromium flag, security setting, diagnostics, README, or workflow behavior was changed.

@Mammad3861
Mammad3861 merged commit b13b301 into main Sep 9, 2026
2 checks passed
@Mammad3861
Mammad3861 deleted the fix/streamed-credential-prompt branch September 9, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant