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

PLAIN mechanism implementation not conforming to 24/ZMTP-PLAIN #3500

Closed
huiyaozheng opened this issue May 9, 2019 · 3 comments · Fixed by #3502
Closed

PLAIN mechanism implementation not conforming to 24/ZMTP-PLAIN #3500

huiyaozheng opened this issue May 9, 2019 · 3 comments · Fixed by #3502

Comments

@huiyaozheng
Copy link

Issue description

One of the the messages exchanged during the checking of PLAIN mechanism seems incorrect according to the RFC.

Environment

  • libzmq version (commit hash if unreleased): 4.3.0
  • OS: macOS 10.14.4

Minimal test code / Steps to reproduce the issue

Use the test code at https://github.com/zeromq/czmq/blob/master/examples/security/woodhouse.c/

  1. Start a packet capturer (e.g. WireShark) and listen on the local loopback port 9000.
  2. Compile and run the example code.
  3. Examine the packet trace and locate the first message sent by the client after the greeting.

What's the actual result? (include assertion message & call stack if applicable)

The client sends "\x04\x15\x05WELCOME\x05admin\x06secret"

What's the expected result?

The client should have sent "\x04\x15\x05HELLO\x05admin\x06secret", according to the specification in 24/ZMTP-PLAIN.

@bluca
Copy link
Member

bluca commented May 9, 2019

Looks like a bug introduced by 7f880c2 @sigiesec do you have time to send a PR to fix it? I'm a bit swamped these days - I guess we never noticed because the server uses the same common definition now, so it was accepted, and nobody until now tried interop, and we don't have a unit test that mocks the protocol

@sigiesec
Copy link
Member

sigiesec commented May 9, 2019

I guess I can fix this tomorrow.

@bluca
Copy link
Member

bluca commented May 9, 2019

Thanks!

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

Successfully merging a pull request may close this issue.

3 participants