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

Dont send an empty challenge when no initial response in anonymous authentication #27

Closed

Conversation

albertony
Copy link

The trace information in anonymous authentication is optional, so I don't think the server should send an empty challenge back if it is not specified in optional initial response argument to the AUTH command in SMTP for instance.

This is related to emersion/go-smtp#258

@emersion
Copy link
Owner

emersion commented Apr 12, 2024

There is a subtle detail in the go-sasl API here: response = nil means no initial response, and response = []byte{} (a non-nil empty slice) means that the initial response was sent but was empty. (See the doc comment for Server.)

I think the current code is correct.

(We should definitely get rid of that footgun though…)

@albertony
Copy link
Author

Aha, I see. I missed that distinction. So I will update the go-smtp pr accordingly, and hopefully fix the issue entirely with that. This can therefore be closed, unless you meant there was some other improvement that should be done..?
Thanks.

@emersion
Copy link
Owner

I've opened #28 for the footgun.

@emersion emersion closed this Apr 12, 2024
@albertony albertony deleted the anonymous-optional-trace branch April 12, 2024 13:15
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

Successfully merging this pull request may close these issues.

2 participants