Repository navigation
auth: a refused paste no longer ends the sign-in - #45
Merged
Merged
Conversation
Lines pasted after `hanzo auth login` reach its paste leg. A `curl … \` line was taken as a bare code, IAM refused it, and the login exited, closing the loopback the browser was about to return to (Safari: "Can't connect to the server"). Now a line with whitespace or a scheme is not a code, a code IAM refuses is answered and the race goes on, and a URL from another sign-in is answered rather than aborting. Errors print as one line, without the backtrace RUST_BACKTRACE added to every failure. Co-authored-by: Hanzo Dev <dev@hanzo.ai>
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lines pasted after
hanzo auth loginreach its paste leg. Acurl … \line was taken as a bare authorization code, IAM refused it (invalid_grant), and the login exited — closing the loopback the browser was about to return to, so Safari showed "Can't connect to the server" while the real code sat in its address bar.stateis answered instead of aborting.Error: …) without the stack backtraceRUST_BACKTRACEadded.Tests:
wire_a_refused_paste_leaves_the_sign_in_waitingandwire_after_a_refused_paste_the_browser_still_lands(both fail against the old code),a_pasted_command_or_address_is_not_a_code.cargo test --bin hanzo: 399 passed.Release 8.5.913.