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

Digest MD5 fails due to error in Base64.js #113

Open
BrettHolton opened this issue Dec 2, 2013 · 0 comments
Open

Digest MD5 fails due to error in Base64.js #113

BrettHolton opened this issue Dec 2, 2013 · 0 comments

Comments

@BrettHolton
Copy link

When using SASL Digest-MD5 mechanism, the user will recieve a bad-protocol error because the second challenge response will be:

<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>AA==</response>

instead of:

<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'></response>

I believe I have traced this down to the Base64 encode implementation. In Base64.js the encode function is implemented as a do while(), this means that the empty challenge response of "" gets encoded to AA== which then gets sent to the server and results in failure. This implementation of Base64 encoding does not cause this error.
http://www.webtoolkit.info/javascript-base64.html#.Up0Pr8Try4E

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

1 participant