Opened 4 months ago

Closed 3 months ago

#9377 defect closed fixed (fixed)

Don't strip spaces from peer's SSH version

Reported by: Adi Roiban Owned by: Adi Roiban <adi.roiban@…>
Priority: normal Milestone:
Component: conch Keywords:
Cc: Branch: 9377-cautious-handling-version-string
branch-diff, diff-cov, branch-cov, buildbot
Author:

Description

Some SSH servers (ex some Bitvise versions) have a trailing space in the version string (when configured to not show the version)

see https://github.com/mscdex/ssh2/issues/488#issuecomment-329085866

Conch SSH is bold and does a full strip on the version string https://github.com/twisted/twisted/blob/3bd48ac703b414d385fb59534e0cd3db727d8f33/src/twisted/conch/ssh/transport.py#L732

I have checked the RFC 4253 section 4.2 and I don't any mention that comment part should not end with a space https://tools.ietf.org/html/rfc4253#section-4.2

So I think that Conch SSH should be updated to only strip the new lines characters and not spaces

Change History (4)

comment:1 Changed 4 months ago by Adi Roiban

Branch: 9377-cautious-handling-version-string
Keywords: review added
Summary: Don't strip spaces from peers SSH versionDon't strip spaces from peer's SSH version

comment:4 Changed 3 months ago by Adi Roiban <adi.roiban@…>

Owner: set to Adi Roiban <adi.roiban@…>
Resolution: fixed
Status: newclosed

In 89e7117:

Merge pull request #957 from twisted/9377-cautious-handling-version-string

Author: adiroiban
Reviewer: markrwilliams
Fixes: ticket:9377

Don't remove trailing spaces from SSH version string comment.

Note: See TracTickets for help on using tickets.