ssh: use errors.As for PartialSuccessError unwrapping#352
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
20f739d to
4fe8209
Compare
|
Rewrote the commit with |
|
This PR (HEAD: 4fe8209) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/790420. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/790420. |
|
Updated the PR description to address the Gerrit bot feedback: removed all Markdown formatting (backticks, bold, code fences), wrapped all lines to ≤76 characters, and added 'Updates golang/go#79809' as the bug reference. |
|
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/790420. |
When BannerError wraps a PartialSuccessError, the auth loop failed to detect it. Use errors.As instead of a type assertion. Updates golang/go#79809
4fe8209 to
724988c
Compare
|
Trimmed the commit message to plain text, ≤76 char lines, no markdown formatting — per Ian Lance Taylor's Gerrit review feedback. The fix itself is unchanged. |
|
This PR (HEAD: 724988c) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/790420. Important tips:
|
ssh: use errors.As for PartialSuccessError unwrapping
When BannerError wraps a PartialSuccessError, the auth loop
failed to detect it. Use errors.As instead of a type assertion
so that wrapped PartialSuccessError values are recognised.
A new test TestBannerWrappingPartialSuccess is added to verify
the banner is delivered, the client completes the password second
factor, and the connection is established.
Updates golang/go#79809