Repository navigation
Conversation
Member
|
Thinking it'd be ideal to pull this in during/after 3.0 (when we drop Python 2; it should be the next non-bugfix level release for this project, so not super duper far away) and then use an enum (which will be in stdlib at that point) instead of string comparisons. I'll think about it. Thanks for this! |
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.
Some clients have unexpected behavior that can be somehow buggy, violate SSH protocol, but the server has to deal with such clients.
The example of such behavior is OpenSSH<7.8 in combination with gnome-keyring as ssh-agent: when rsa-sha2-{256,512} is used, gnome-keyring still returns old SHA1 based signature, and older OpenSSH client versions just silently accept it, pretending it to be the signature being requested. Unfortunately this combination happens on Ubuntu 16.04 LTS which is still widespread.
This PR adds support for client-name based quirks to deal with such behavior, and the quirk to deal with one exact bug described above.
A similar quirk in OpenSSH itself just disables signature type validation, however I believe it would be better to just not send SSH2_MSG_EXT_INFO which is commonly used to inform client that rsa-sha2-{256,512} algorithms are supported.