Ticket #4428 enhancement closed fixed

Opened 3 years ago

Last modified 3 years ago

feature: let twisted.conch.ssh.transport supported ssh version to be overriden

Reported by: alanfranzoni Owned by:
Priority: normal Milestone:
Component: conch Keywords:
Cc: Branch: branches/conch-supported-versions-check-4428
Author: alanfranzoni Launchpad Bug:

Description

Currently, twisted.conch.ssh.transport ssh protocol supported versions are hardcoded into the dataReceived method, and cannot be overriden. While this isn't usually a problem, some half-baked ssh implementations do sometimes return a strange version number (notably, 2.99) even though the protocol version is actually 2.0.

While this shouldn't be hardcoded in the transport, since it's actually a protocol glitch, this patch allows SSHTransportBase subclassers to override supported version numbers without rewriting the dataReceived method, if this is necessary.

Attachments

4428.patch Download (2.0 KB) - added by alanfranzoni 3 years ago.
4428-bis.patch Download (4.4 KB) - added by alanfranzoni 3 years ago.

Change History

Changed 3 years ago by alanfranzoni

1

Changed 3 years ago by alanfranzoni

  • owner z3p deleted
  • keywords review added

Patch attached. Please note that INotify tests on current twisted trunk actually fail on my machine - but they seem to fail without the patch as well, it seems a totally unrelated issue.

2

Changed 3 years ago by exarkun

  • keywords review removed
  • owner set to alanfranzoni

Thanks. Can you also add a unit test for this feature?

Changed 3 years ago by alanfranzoni

3

Changed 3 years ago by alanfranzoni

  • keywords review added
  • owner alanfranzoni deleted

I had to patch the whole thing a bit more in order to write a proper unit test. I hope this is fine now.

4

Changed 3 years ago by exarkun

  • branch set to branches/conch-supported-versions-check-4428
  • branch_author set to exarkun

(In [28914]) Branching to 'conch-supported-versions-check-4428'

5

Changed 3 years ago by exarkun

(In [28915]) Apply alanfranzoni's patch

refs #4428

6

Changed 3 years ago by exarkun

  • branch_author changed from exarkun to alanfranzoni

7

Changed 3 years ago by exarkun

(In [28963]) fix typo in docstring

refs #4428

8

Changed 3 years ago by exarkun

  • keywords review removed
  • owner set to exarkun

Thanks. I checked the patch into a branch, fixed some simple doc issues and some coding standard problems, but the basic change looks good to me.

9

Changed 3 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [28972]) Merge conch-supported-versions-check-4428

Author: alanfranzoni Reviewer: exarkun Fixes: #4428

Add an overrideable attribute which can be used to control the declared protocol versions SSHTransportBase considers supported.

10

Changed 3 years ago by exarkun

  • status changed from closed to reopened
  • resolution fixed deleted

(In [28975]) Revert r28972 - doc formatting regression

The new _unsupportedVersionReceived method's docstring is not valid epytext.

Reopens #4428

11

Changed 3 years ago by exarkun

  • status changed from reopened to closed
  • resolution set to fixed

(In [28979]) Merge conch-supported-versions-check-4428

Author: alanfranzoni Reviewer: exarkun Fixes: #4428

Add an overrideable attribute which can be used to control the declared protocol versions SSHTransportBase considers supported.

12

Changed 2 years ago by <automation>

  • owner exarkun deleted
Note: See TracTickets for help on using tickets.