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

Wrong SASL mechanism is used after upgrade 0.5.2 -> 0.7.0 #637

Closed
DaveLomber opened this issue Apr 7, 2019 · 6 comments
Closed

Wrong SASL mechanism is used after upgrade 0.5.2 -> 0.7.0 #637

DaveLomber opened this issue Apr 7, 2019 · 6 comments

Comments

@DaveLomber
Copy link

I used 0.5.2 version and all was good. I use PLAIN SASL mechanism to authenticate

Now I upgraded to 0.7.0 and my code is broken, by some reason the lib started choosing ANONYMOUS mechanism even if I provide the username & password

I did some debugging of this file https://github.com/xmppjs/xmpp.js/blob/master/packages/sasl/index.js#L80
and here is what I got:

supported mech (2) ["ANONYMOUS", "PLAIN"]
offered mech (3) ["PLAIN", "ANONYMOUS", "PLAIN_FAST"]
intersection mech (2) ["ANONYMOUS", "PLAIN"]
chosen mech: ANONYMOUS

so we got here intersection= ["ANONYMOUS", "PLAIN"] and then let mech = intersection[0] and we got ANONYMOUS

Any reason for this? can we somehow set a mechanism we want to use?

@DaveLomber DaveLomber changed the title Wrong SASL mechanism is used Wrong SASL mechanism is used after upgrade 0.5.2 -> 0.7.0 Apr 7, 2019
@DaveLomber
Copy link
Author

As I see it somehow touched here 18984f7

@DaveLomber
Copy link
Author

@sonnyp could you provide your feedback here

@sonnyp
Copy link
Member

sonnyp commented Apr 18, 2019

@DaveLomber thanks for looking into it

I wrongly assumed that a domain would not offer both anonymous and non anonymous mechanisms. I will address this.

@DaveLomber
Copy link
Author

Hi @sonnyp
do you have any updates here?

@sonnyp
Copy link
Member

sonnyp commented May 16, 2019

fixed in #691

@sonnyp
Copy link
Member

sonnyp commented May 16, 2019

@sonnyp sonnyp closed this as completed May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants