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
GitHub token containing a control character causes SIGABRT in src/github.rs:924
#13471
mise aborts with SIGABRT when a resolved GitHub token contains a character that is invalid in an HTTP header, such as a newline.
Instead of returning a normal credential/configuration error, mise panics at src/github.rs:924 because the result of HeaderValue::from_str() is unwrapped.
Environment
mise: 2026.9.12 linux-x64 (2026-09-20)
OS: Arch Linux / Omarchy 4.0.4-1
Kernel: 7.2.5-3-omarchy
Architecture: x86_64
Original failure
The crash occurred while running:
MISE_MINIMUM_RELEASE_AGE=0 mise up
Output:
The application panicked (crashed).
Message: called `Result::unwrap()` on an `Err` value: InvalidHeaderValueLocation: src/github.rs:924=== Async Backtrace (panic occurred in tokio runtime) ===[no accessible async backtrace]------- TASK DUMP TREE -------=== End Async Backtrace ===Aborted (core dumped)systemd-coredump recorded:Command Line: mise upSignal: SIGABRTCrashing thread: tokio-rt-workerThis occurred twice with the same abort signature.## Minimal reproductionIn Bash:ulimit -c 0GITHUB_TOKEN=$'dummy\nvalue' \ RUST_BACKTRACE=1 \ mise latest 'github:can1357/oh-my-pi@latest'This reliably produces:The application panicked (crashed).Message: called `Result::unwrap()` on an `Err` value: InvalidHeaderValueLocation: src/github.rs:924The value above is only a dummy token; no real credential is required to reproduce the problem.## Expected behaviormise should reject the malformed credential and return a normal, redacted error, for example:Invalid GitHub credential: token contains characters that cannot be used in an HTTP headerThe credential itself must not be included in the error.## Actual behaviorThe whole process aborts because HeaderValue::from_str() is followed by .unwrap():headers.insert( reqwest::header::AUTHORIZATION, HeaderValue::from_str(format!("Bearer {token}").as_str()).unwrap(),);The same unchecked conversion also exists in the raw-content header path immediately below it.## Suggested fixPropagate or map InvalidHeaderValue instead of unwrapping it. Since get_headers() already returns a Result<HeaderMap>, the conversion could return a contextual, redacted error.It may also be useful to validate credentials at the resolution boundary so all token sources—environment variables, credential_command, OAuth, token files, and CLI configuration—receive consistent handling.## Additional information- This was not caused by OOM or resource exhaustion.- The crash happens before any tool upgrade completes.- A subsequent dry run with a currently valid credential succeeds, so the malformed value may come from transient credential state or the launching shell’s environment.- Current upstream main still contains the unchecked .unwrap() at the time of this report.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Description
miseaborts withSIGABRTwhen a resolved GitHub token contains a character that is invalid in an HTTP header, such as a newline.Instead of returning a normal credential/configuration error,
misepanics atsrc/github.rs:924because the result ofHeaderValue::from_str()is unwrapped.Environment
2026.9.12 linux-x64 (2026-09-20)7.2.5-3-omarchyOriginal failure
The crash occurred while running:
All reactions