Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed precodition when connecting to ssh server with algorithms .all #76

Open
depth42 opened this issue Oct 29, 2024 · 1 comment
Open
Assignees

Comments

@depth42
Copy link

depth42 commented Oct 29, 2024

Describe the bug
When connecting to a certain ssh server, Citadel crashes with a failed precondition.

Reproducer Sample

  • Build and run the sample code attached in a zip file. This is the relevant part:

func test() async throws {
let client = try await SSHClient.connect(
host: "vwp5409.webpack.hosteurope.de",
authenticationMethod: .passwordBased(username: "abc", password: "abc"),
hostKeyValidator: .acceptAnything(),
reconnect: .never,
algorithms: .all
)
try await client.close()
}

Expected behavior
The connection attempt should throw an error because of wrong user credentials.

** Actual behavior**
The app terminates with a failed precondition in NIOCore.ByteBuffer-code:1066
"NIO-ELT-0-#0 (9): Precondition failed: new writerIndex: 2051, expected: range(0, 2048)"

Client (please complete the following information):

  • macOS 15.0.1
  • Xcode 16.0
  • Citadel 0.8

Server (please complete the following information):

  • OpenSSH_7.9p1 Debian-10+deb10u4

SFTPClient.zip

@Joannis
Copy link
Member

Joannis commented Nov 8, 2024

Thanks for the report, and the repro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants